Skip to content
Snippets Groups Projects
Commit 3032f453 authored by Tamaki Fujino's avatar Tamaki Fujino Committed by Yas Naoi
Browse files

Issue #3252922 by TamakiFujino, yas: Add a BDD test suite for AWS resources (Volumes)

parent 9aff976d
No related branches found
No related tags found
1 merge request!548Issue #3252922: Add a BDD test suite for AWS resource: Volumes
......@@ -20,6 +20,8 @@ elastic_ip_domain:
Standard
description:
Created by behat
device_name:
/dev/sdh
image_id:
ami-0ffd5d172624ebfe2
image_name:
......@@ -52,6 +54,10 @@ subnet_name:
BDD_Subnet_@Random
instance_name:
BDD_Instance_@Random
volume_name:
BDD_Volume_@Random
volume_size:
1
vpc_name:
BDD_VPC_@Random
wait:
......
......@@ -40,7 +40,7 @@ Feature: Create resources for AWS as "Authenticated User"
When I visit "/clouds/aws_cloud/{{ cloud_context }}/subnet/add"
And I enter "{{ subnet_name }}" for "Name"
And I select "{{ vpc_name }}" from "VPC CIDR (ID)"
And I select "{{ avail_zone }}" from "Availability Zone"
And I select "{{ availability_zone }}" from "Availability Zone"
And I enter "{{ ipv4_cidr }}" for "IPv4 CIDR block"
And I press "Save"
And I wait for AJAX to finish
......
......@@ -39,7 +39,7 @@ Feature: Launch an EC2 instance as "Authenticated User"
And I enter "{{ instance_name }}" for "Name"
And I select "{{ instance_type }}" from "Instance type"
And I select "{{ image_name }}" from "Image ID"
And I select "{{ avail_zone }}" from "Availability Zone"
And I select "{{ availability_zone }}" from "Availability Zone"
And I select "{{ vpc_name }}" from "VPC"
And I wait for AJAX to finish
And I select "{{ subnet_name }}" from "Subnet"
......
Feature: Create and delete a volume as "Authenticated User"
@javascript @api
Scenario: Create a Volume
Given I am logged in as a user with the "{{ role_name }}" role
When I visit "/clouds/aws_cloud/{{ cloud_context }}/volume/add"
And I should see the heading "Add AWS Cloud volume"
And I enter "{{ volume_name }}" for "Name"
And I enter "{{ volume_size }}" for "Size (GiB)"
And I select "{{ region_code }}" from "Availability Zone"
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/volume"
And I should see "has been created"
And I should see "creating" in the "{{ volume_name }}" row
@javascript @api
Scenario: Attach the Volume
Given I am logged in as a user with the "{{ role_name }}" role
When I visit "/clouds/aws_cloud/{{ cloud_context }}/volume"
And I click "Refresh"
And I wait {{ wait }} milliseconds
And I should see the link "{{ volume_name }}"
And I should see "available" in the "{{ volume_name }}" row
And I click "{{ volume_name }}"
And the url should match "/volume/"
And I click "Attach"
And the url should match "/attach"
And I enter "{{ device_name }}" for "Device Name"
And I press "Attach"
And I wait for AJAX to finish
Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/volume"
And I should see "is attaching to"
And I should see "attaching" in the "{{ volume_name }}" row
@javascript @api
Scenario: Detach the Volume
Given I am logged in as a user with the "{{ role_name }}" role
When I visit "/clouds/aws_cloud/{{ cloud_context }}/volume"
And I click "Refresh"
And I wait {{ wait }} milliseconds
And I should see the link "{{ volume_name }}"
And I should see "in-use" in the "{{ volume_name }}" row
And I click "{{ volume_name }}"
And the url should match "/volume/"
And I click "Detach"
And the url should match "/detach"
And I press "Detach"
Then the url should match "/clouds/aws_cloud/{{ cloud_context }}/volume"
And I should see "is detaching from"
And I should see "detaching" in the "{{ volume_name }}" row
@javascript @api
Scenario: Delete the Volume
Given I am logged in as a user with the "{{ role_name }}" role
When I visit "/clouds/aws_cloud/{{ cloud_context }}/volume"
And I click "Refresh"
And I wait {{ wait }} milliseconds
And I should see the link "{{ volume_name }}"
And I should see "available" in the "{{ volume_name }}" row
And I click "{{ volume_name }}"
And the url should match "/volume/"
And I click "Delete" in the "actions"
And the url should match "/delete"
And I press "Delete"
And I wait for AJAX to finish
Then I should be on "/clouds/aws_cloud/{{ cloud_context }}/volume"
And I should see "has been deleted"
And I click "Refresh"
# volume_name exists in a listing view.
And I should not see the link "{{ volume_name }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment