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

Issue #3349803 by TamakiFujino, yas: Refactor to remove and reorganize BDD...

Issue #3349803 by TamakiFujino, yas: Refactor to remove and reorganize BDD test scenarios regarding the removal of OpenStack network interface
parent abeebd90
No related branches found
No related tags found
No related merge requests found
Showing
with 214 additions and 76 deletions
......@@ -11,20 +11,22 @@ Feature: Confirm OpenStack resources created through the previous BDD tests do n
And I should see neither error nor warning messages
Examples:
| resource_link | resource_name |
| instance | instance |
| image | images |
| security_group | security groups |
| floating_ip | floating IP |
| key_pair | key pairs |
| volume | volumes |
| snapshot | snapshots |
| network | networks |
| subnet | subnets |
| port | ports |
| router | routers |
| quota | quotas |
| stack | stacks |
| template_version | template versions |
| server_group | server groups |
| project | projects |
| resource_link | resource_name |
| instance | instance |
| image | images |
| security_group | security groups |
| floating_ip | floating IP |
| key_pair | key pairs |
| volume | volumes |
| snapshot | snapshots |
| network | networks |
| subnet | subnets |
| port | ports |
| router | routers |
| quota | quotas |
| stack | stacks |
| template_version | template versions |
| server_group | server groups |
| project | projects |
| role | roles |
| user | users |
......@@ -33,10 +33,12 @@ Feature: Check the permission setting as an "authenticated user"
Examples:
| resource |
| project |
| quota |
| server group |
| template version |
| server group |
| project |
| role |
| user |
@api
Scenario: View the key pair permissions of the authenticated user role
......
@minimal @ci_job
Feature: Create, associate, read, update, disassociate and delete a floating IP for OpenStack as an "authenticated user"
Feature: Create, associate, disassociate, and delete a floating IP for OpenStack as an "authenticated user"
@api
Scenario: Create a launch template
Scenario: Create an external network
Given I am logged in as user "{{ drupal_user_name }}"
When I visit "/clouds/design/server_template/{{ cloud_context }}/openstack/add"
And I should see the heading "Add OpenStack"
And I enter "{{ instance_name_operate_floating_ip }}" for "Name"
And I select "{{ instance_flavor }}" from "Flavor"
And I select "{{ image_name }}" from "Image ID"
And I select "{{ availability_zone }}" from "Availability Zone"
And I select "{{ security_group_name }}" from "Security groups"
And I select "{{ key_pair_name }}" from "SSH key"
And I select "{{ network_name_operate_floating_ip }}" from "Network"
And I select "{{ server_group_name }}" from "Server group name"
When I visit "/clouds/openstack/{{ cloud_context }}/network/add"
And I should see the heading "Add OpenStack network"
And I enter "{{ network_external_name_operate }}" for "Name"
And I check the box "External network"
# Temporarily comment out because of the error when selecting Availability Zone
# And I select "{{ availability_zone }}" from "Availability Zone"
And I press "Save"
Then the url should match "/clouds/design/server_template/{{ cloud_context }}/"
Then the url should match "/clouds/openstack/{{ cloud_context }}/network"
And I should see the success message "has been created"
And I should see neither error nor warning messages
And I should see the heading "{{ instance_name_operate_floating_ip }}"
And I should see the link "{{ network_external_name_operate }}" in the table
@api
Scenario: Launch an instance
Scenario: Create a subnet with the external network
Given I am logged in as user "{{ drupal_user_name }}"
When I visit "/clouds/design/server_template/{{ cloud_context }}"
And I click "{{ instance_name_operate_floating_ip }}"
And I should see the heading "{{ instance_name_operate_floating_ip }}"
And I click "Launch"
Then the url should match "/launch"
And I press "Launch"
Then the url should match "/clouds/openstack/{{ cloud_context }}/instance"
And I should see the success message "has been launched"
When I visit "/clouds/openstack/{{ cloud_context }}/subnet/add"
And I should see the heading "Add OpenStack subnet"
And I enter "{{ subnet_name_operate }}" for "Name"
And I select "{{ network_external_name_operate }}" from "Network"
And I enter "{{ network_address }}" for "CIDR"
And I select "{{ ip_version }}" from "IP version"
And I press "Save"
Then the url should match "/clouds/openstack/{{ cloud_context }}/subnet"
And I should see the success message "has been created"
And I should see neither error nor warning messages
And I wait {{ wait }} milliseconds
And I click "Refresh"
And I should see "{{ instance_flavor }}" in the "{{ instance_name_operate_floating_ip }}" row
And I should see "{{ availability_zone }}" in the "{{ instance_name_operate_floating_ip }}" row
And I should see the link "{{ subnet_name_operate }}" in the table
@api
Scenario: Create a floating IP
......@@ -43,57 +37,13 @@ Feature: Create, associate, read, update, disassociate and delete a floating IP
When I visit "/clouds/openstack/{{ cloud_context }}/floating_ip/add"
And I should see the heading "Add OpenStack floating IP"
And I enter "{{ floating_ip_name_operate }}" for "Name"
And I select "{{ floating_network_id }}" from "Floating network ID"
And I select "{{ network_external_name_operate }}" from "Floating network ID"
And I press "Save"
Then the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip"
And I should see the success message "has been created"
And I should see neither error nor warning messages
And I should see the link "{{ floating_ip_name_operate }}" in the table
@api @javascript
Scenario: Associate the floating IP
Given I am logged in as user "{{ drupal_user_name }}"
When I visit "/clouds/openstack/{{ cloud_context }}/instance"
And I click "Refresh"
And I visit "/clouds/openstack/{{ cloud_context }}/floating_ip"
And I click "Refresh"
And I should see the link "{{ floating_ip_name_operate }}"
And I wait {{ wait }} milliseconds
And I click "{{ floating_ip_name_operate }}"
And the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip/"
And I should see "Associate Floating IP" in the "actions"
And I click "Associate Floating IP"
Then the url should match "/associate"
And I select "{{ resource_type }}" from "Resource type"
And I select "{{ instance_name_operate_floating_ip }}" from "Instance"
And I wait {{ wait }} milliseconds
And I press "Associate"
# Without @javascript, an error occurs: Unable to load network interface by private IP.
Then the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip/"
And I should see the success message "associated with"
And I should see neither error nor warning messages
And I should see "Disassociate Floating IP" in the "actions"
@api
Scenario: Disassociate the floating IP
Given I am logged in as user "{{ drupal_user_name }}"
When I visit "/clouds/openstack/{{ cloud_context }}/floating_ip"
And I click "Refresh"
And I should see the link "{{ floating_ip_name_operate }}"
And I wait {{ wait }} milliseconds
And I click "{{ floating_ip_name_operate }}"
And the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip/"
And I should see "Disassociate Floating IP" in the "actions"
And I click "Disassociate Floating IP"
Then the url should match "/disassociate"
And I press "Disassociate"
Then the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip"
And I should see the success message "disassociated"
And I should see neither error nor warning messages
And I click "{{ floating_ip_name_operate }}"
And the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip/"
And I should see "Associate Floating IP" in the "actions"
@api
Scenario: Read the floating IP
Given I am logged in as user "{{ drupal_user_name }}"
......@@ -104,7 +54,9 @@ Feature: Create, associate, read, update, disassociate and delete a floating IP
And I click "{{ floating_ip_name_operate }}"
Then the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip/"
And I should see "{{ floating_ip_name_operate }}" in the "page_header"
And I should see "{{ floating_ip_name_operate }}" in the "Name"
And I should see "{{ drupal_user_name }}" in the "Authored by"
And I should see neither error nor warning messages
@api
Scenario: Update the floating IP
......@@ -115,16 +67,18 @@ Feature: Create, associate, read, update, disassociate and delete a floating IP
And I wait {{ wait }} milliseconds
And I click "{{ floating_ip_name_operate }}"
Then the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip/"
And I click "Edit"
And I click "Edit" in the actions
And the url should match "/edit"
And I enter "{{ floating_ip_name_operate_updated }}" for "Name"
And I press "Save"
Then I should see the success message "has been updated"
Then the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip"
And I should see the success message "has been updated"
And I should see neither error nor warning messages
And I should see the link "{{ floating_ip_name_operate_updated }}" in the table
And I should not see the link "{{ floating_ip_name_operate }}" in the table
@api
Scenario: Delete the floating ip
Scenario: Delete the floating IP
Given I am logged in as user "{{ drupal_user_name }}"
When I visit "/clouds/openstack/{{ cloud_context }}/floating_ip"
And I click "Refresh"
......@@ -132,51 +86,48 @@ Feature: Create, associate, read, update, disassociate and delete a floating IP
And I wait {{ wait }} milliseconds
And I click "{{ floating_ip_name_operate_updated }}"
And the url should match "/clouds/openstack/{{ cloud_context }}/floating_ip/"
And I click "Delete"
And I click "Delete" in the actions
Then the url should match "/delete"
And I press "Delete"
Then I should be on "/clouds/openstack/{{ cloud_context }}/floating_ip"
And I should be on "/clouds/openstack/{{ cloud_context }}/floating_ip"
And I should see the success message "has been deleted"
And I should see neither error nor warning messages
And I click "Refresh"
# No tables exist.
And I should not see the link "{{ floating_ip_name_operate_updated }}"
@api
Scenario: Terminate the created instance
Scenario: Delete the subnet
Given I am logged in as user "{{ drupal_user_name }}"
When I visit "/clouds/openstack/{{ cloud_context }}/instance"
When I visit "/clouds/openstack/{{ cloud_context }}/subnet"
And I click "Refresh"
And I should see "running" in the "{{ instance_name_operate_floating_ip }}" row
And I should see the link "{{ instance_name_operate_floating_ip }}"
And I wait {{ wait }} milliseconds
And I click "{{ instance_name_operate_floating_ip }}"
Then the url should match "/clouds/openstack/{{ cloud_context }}/instance/"
And I should see the link "{{ subnet_name_operate }}"
And I wait {{ wait }} milliseconds
And I click "Delete"
Then the url should match "/terminate"
And I press "Delete | Terminate"
Then I should be on "/clouds/openstack/{{ cloud_context }}/instance"
And I click "{{ subnet_name_operate }}"
And the url should match "/clouds/openstack/{{ cloud_context }}/subnet/"
And I click "Delete" in the actions
Then the url should match "/delete"
And I press "Delete"
Then I should be on "/clouds/openstack/{{ cloud_context }}/subnet"
And I should see the success message "has been deleted"
And I should see neither error nor warning messages
And I wait {{ wait_deleted }} milliseconds
And I click "Refresh"
And I should see with "stopped" in the "{{ instance_name_operate_floating_ip }}" row, no rows, or no table
And I should not see the link "{{ subnet_name_operate }}"
@api
Scenario: Delete the Cloud launch template
Scenario: Delete the external network
Given I am logged in as user "{{ drupal_user_name }}"
When I visit "/clouds/design/server_template/{{ cloud_context }}"
When I visit "/clouds/openstack/{{ cloud_context }}/network"
And I click "Refresh"
And I should see the link "{{ instance_name_operate_floating_ip }}"
And I should see the link "{{ network_external_name_operate }}"
And I wait {{ wait }} milliseconds
And I click "{{ instance_name_operate_floating_ip }}"
Then the url should match "/clouds/design/server_template/{{ cloud_context }}/"
And I click "Delete"
And I click "{{ network_external_name_operate }}"
And the url should match "/clouds/openstack/{{ cloud_context }}/network/"
And I click "Delete" in the actions
Then the url should match "/delete"
And I press "Delete"
Then I should be on "/clouds/design/server_template/{{ cloud_context }}"
Then I should be on "/clouds/openstack/{{ cloud_context }}/network"
And I should see the success message "has been deleted"
And I should see neither error nor warning messages
And I wait {{ wait_deleted }} milliseconds
And I click "Refresh"
And I should not see the link "{{ instance_name_operate_floating_ip }}"
And I should not see the link "{{ network_external_name_operate }}"
@ci_job
@my_test @ci_job
Feature: Confirm the availability of the refresh button
@api
......@@ -9,21 +9,25 @@ Feature: Confirm the availability of the refresh button
Then I should see the success message "Updated"
Examples:
| resource |
| instance |
| image |
| security_group |
| floating_ip |
| key_pair |
| volume |
| snapshot |
| network |
| subnet |
| port |
| router |
| quota |
| stack |
| server_group |
| resource |
| instance |
| image |
| security_group |
| floating_ip |
| key_pair |
| volume |
| snapshot |
| network |
| subnet |
| port |
| router |
| quota |
| stack |
| template_version |
| server_group |
| project |
| role |
| user |
@api
Scenario Outline: Refresh the list of resource as Cloud administrator
......@@ -33,21 +37,25 @@ Feature: Confirm the availability of the refresh button
Then I should see the success message "Updated"
Examples:
| resource |
| instance |
| image |
| security_group |
| floating_ip |
| key_pair |
| volume |
| snapshot |
| network |
| subnet |
| port |
| router |
| quota |
| stack |
| server_group |
| resource |
| instance |
| image |
| security_group |
| floating_ip |
| key_pair |
| volume |
| snapshot |
| network |
| subnet |
| port |
| router |
| quota |
| stack |
| template_version |
| server_group |
| project |
| role |
| user |
@api
Scenario Outline: Confirm the refresh button is not visible to Authenticated user
......@@ -56,18 +64,22 @@ Feature: Confirm the availability of the refresh button
And I should not see "Refresh"
Examples:
| resource |
| instance |
| image |
| security_group |
| floating_ip |
| key_pair |
| volume |
| snapshot |
| network |
| subnet |
| port |
| router |
| quota |
| stack |
| server_group |
| resource |
| instance |
| image |
| security_group |
| floating_ip |
| key_pair |
| volume |
| snapshot |
| network |
| subnet |
| port |
| router |
| quota |
| stack |
| template_version |
| server_group |
| project |
| role |
| user |
......@@ -87,8 +87,6 @@ drupal_user_name:
BDD_user_@Random
drupal_user_password:
BDD_pwd_@Random
floating_network_id:
public
floating_ip_name_operate:
BDD_FIP_@Random_operate
floating_ip_name_operate_updated:
......@@ -114,9 +112,6 @@ instance_name_operate_1:
instance_name_operate_2:
# Also used as a launch template name in the scenarios for launching instance.
BDD_instance_@Random_operate_2
instance_name_operate_floating_ip:
# Also used as a launch template name in the scenarios for floating ip.
BDD_instance_@Random_operate_3
instance_flavor:
m1.tiny
# This is for verifying the bug fix, not getting the first element of flavors.
......@@ -156,16 +151,12 @@ network_for_port:
# The user can choose from "Fixed IP address", "Subnet", or "Unspecified"
# When "Unspecified" is selected, a fixed IP address will be given
Unspecified
network_interface_name_operate:
BDD_network_interface_@Random_operate
network_name:
BDD_network_@Random
network_name_operate:
BDD_network_@Random_operate
network_name_operate_updated:
BDD_network_@Random_updated_operate
network_name_operate_floating_ip:
private
next_hop:
10.0.0.250
port_name_operate:
......@@ -182,8 +173,6 @@ quota_name_operate:
quota
region:
# You need to change the value here, or define the key-value
resource_type:
Instance
role_name_operate:
BDD_role_@Random_operate
role_name_operate_updated:
......
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