Skip to content
Snippets Groups Projects
Commit 7bb2d129 authored by Yutong Li's avatar Yutong Li Committed by Yas Naoi
Browse files

Issue #3239248 by yutong.li, yas, kumikoono: Add acceptance tests to launch an...

Issue #3239248 by yutong.li, yas, kumikoono: Add acceptance tests to launch an instance in AWS Cloud
parent d221bd7d
No related branches found
No related tags found
No related merge requests found
Showing
with 505 additions and 304 deletions
modules/cloud_service_providers/aws_cloud/images/bdd/design/behat/scenarios.png

292 KiB

Feature: Login, logout and list resources on the ongoing state
In order to list resources on the ongoing state
As a user
I need to have both Drupal and AWS IAM permissions
Scenario: Log in with the "Anonymous user" role
Given I am not logged in
When I go to "/clouds"
Then I should be on "/user/login"
And I should see the heading "Log in"
@api
Scenario Outline: Log in
Given I am logged in as a user with the <role> role
And I should see the link "All" in the "nav_bar"
And I should see the link "AWS" in the "nav_bar"
When I go to "/clouds"
Then I should get a 200 HTTP response
And I should see the heading "Cloud Service Providers"
Examples:
| role |
| "Authenticated user" |
| "Administrator" |
@api
Scenario: Log in as an "Administrator"
Given I am logged in as a user with the "Administrator" role
And I should see the link "All" in the "nav_bar"
And I should see the link "AWS" in the "nav_bar"
When I visit "/clouds"
Then I should see "Instance Pricing"
And I should see "Location Map"
And I should see the button "Apply"
@api
Scenario Outline: Log out
Given I am logged in as a user with the <role> role
And I should see the link "All" in the "nav_bar"
And I should see the link "AWS" in the "nav_bar"
And I visit "/"
And I see the heading "Cloud Service Provider Location Map"
When I click "Log out"
Then I should be on "/user/login"
And I should see the link "Log in"
Examples:
| role |
| "Authenticated user" |
| "Administrator" |
@api
Scenario Outline: View the list of Cloud service providers
Given I am logged in as a user with the <role> role
And I should see the link "All" in the "nav_bar"
And I should see the link "AWS" in the "nav_bar"
When I go to "/clouds"
Then I should get a 200 HTTP response
And I should see the heading "Cloud Service Providers"
And I should see "Location Map"
And I should see the button "Apply"
And I should <status> the link "Name"
And I should <status> "Instance Pricing"
Examples:
| role | status |
| "Authenticated user" | not see |
| "Administrator" | see |
@api
Scenario Outline: View the list of AWS resources
Given I am logged in as a user with the <role> role
And I should see the link "All" in the "nav_bar"
And I should see the link "AWS" in the "nav_bar"
When I go to "/clouds/aws_cloud/instance"
Then I should get a 200 HTTP response
And I should see the heading "All AWS Cloud Instances"
And I should see the button "Apply"
And I should see the link "Instances"
Examples:
| role |
| "Authenticated user" |
| "Administrator" |
Feature: Create resource to change from clean to ongoing state
In order to change to ongoing state
As an admin
We need to create some resources
@javascript @api
Scenario Outline: Add an AWS Cloud service provider
Given I am logged in as a user with the "Administrator" role
When I visit "/admin/structure/cloud_config/add/aws_cloud"
And I enter <aws_name> for "Name"
And I enter <account_id> for "Account ID"
And I select <region_name> from "Regions"
And I check the box "Use Instance Profile"
And I press "Save"
And I wait for AJAX to finish
Then I should be on "/clouds"
And I should see "Creating cloud service provider was performed successfully"
And I should see <aws_link>
Examples:
| aws_name | account_id | region_name | aws_link |
| "AWS BDD" | "account_id" | "US West (N. California)" | "AWS BDD (N. California)" |
@javascript @api
Scenario Outline: Create a role and give it permission to AWS BDD
Given I am logged in as a user with the "Administrator" role
When I visit "/admin/people/roles/add"
And I enter <role_name> for "Role name"
And I wait for AJAX to finish
And I enter <role_name_machine> for "Machine-readable name"
And I press "Save"
And I wait for AJAX to finish
And I should be on "/admin/people/roles"
And I should see <role_name>
Then I visit <edit_role>
And I check the box "Add / Launch AWS Cloud instance"
And I check the box "Add AWS Cloud VPC"
And I check the box "Add AWS Cloud VPC subnet"
And I check the box "Add AWS Cloud image"
And I check the box "Add AWS Cloud key pair"
And I check the box "Add AWS Cloud security group"
And I check the box "Delete / Terminate any Amazon EC2 instance"
And I check the box "Delete any AWS Cloud VPC"
And I check the box "Delete any AWS Cloud VPC subnet"
And I check the box "Delete any AWS Cloud image"
And I check the box "Delete any AWS Cloud key pair"
And I check the box "Delete any AWS Cloud security group"
And I check the box "Edit any AWS Cloud VPC"
And I check the box "Edit any AWS Cloud VPC subnet"
And I check the box "Edit any AWS Cloud image"
And I check the box "Edit any AWS Cloud instance"
And I check the box "Edit any AWS Cloud key pair"
And I check the box "Edit any AWS Cloud security group"
And I check the box "List AWS Cloud Image"
And I check the box "List AWS Cloud VPC"
And I check the box "List AWS Cloud VPC subnet"
And I check the box "List AWS Cloud instance"
And I check the box "List AWS Cloud key pair"
And I check the box "List AWS Cloud security group"
And I check the box "List AWS Cloud service provider"
And I check the box "View AWS Cloud Instance Type Prices"
And I check the box "View AWS Cloud service provider"
And I check the box "View any AWS Cloud VPC"
And I check the box "View any AWS Cloud VPC subnet"
And I check the box "View any AWS Cloud image"
And I check the box "View any AWS Cloud instance"
And I check the box "View any AWS Cloud key pair"
And I check the box "View any AWS Cloud security group"
And I check the box "Access AWS BDD (N. California)"
And I check the box "Add cloud launch templates"
And I check the box "Approve launch AWS Cloud instance"
And I check the box "Delete any cloud launch templates"
And I check the box "Edit any cloud launch templates"
And I check the box "Launch cloud launch template"
And I check the box "View any cloud launch templates"
And I press "Save permissions"
And I wait for AJAX to finish
And I should see "The changes have been saved."
Examples:
| edit_role | role_name | role_name_machine |
| "/admin/people/permissions/bdd_role" | "BDD Role" | "bdd_role" |
Feature: Delete the role BDD Role
Feature: Delete resource created by admin to go back to clean state
In order to change to clean state
As an admin
I need to delete some resource
@api
Scenario Outline: Delete the role BDD Role
......@@ -14,3 +17,18 @@ Feature: Delete the role BDD Role
Examples:
| role_name |
| "BDD Role" |
@api
Scenario Outline: Delete the AWS Cloud service provider AWS BDD
Given I am logged in as a user with the "Administrator" role
When I visit "/admin/structure/cloud_config"
And I check the box "edit-cloud-config-bulk-form-0"
And I press "Apply to selected items"
And I press "Delete"
Then I should be on "/admin/structure/cloud_config"
And I should see "Deleted 1 item."
And I should not see the link <aws_link>
Examples:
| aws_link |
| "AWS BDD (N. California)" |
Feature: Add an AWS Cloud service provider
In order to create the resource for Acceptance Test
As an IT admin
I want to add an AWS Cloud service provider named AWS BDD
@javascript
Scenario Outline: Add an AWS Cloud service provider
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And I should be on "/user/1"
When I visit "/admin/structure/cloud_config/add/aws_cloud"
And I enter <aws_name> for "Name"
And I enter <account_id> for "Account ID"
And I select <region_name> from "Regions"
And I check the box "Use Instance Profile"
And I press "Save"
And I wait for AJAX to finish
Then I should be on "/admin/structure/cloud_config"
And I should see "Creating cloud service provider was performed successfully"
And I should see the link <aws_link>
Examples:
| edit_name | edit_pass | aws_name | account_id | region_name | aws_link |
| "bdd_admin_name" | "bdd_admin_pass" | "AWS BDD" | "account_id" | "US West (N. California)" | "AWS BDD (N. California)" |
\ No newline at end of file
Feature: Delete the AWS Cloud service provider AWS BDD
@api
Scenario Outline: Delete the AWS Cloud service provider AWS BDD
Given I am logged in as a user with the "Administrator" role
When I visit "/admin/structure/cloud_config"
And I check the box "edit-cloud-config-bulk-form-1"
#And I check the box "AWS BDD (N. California)"
And I press "Apply to selected items"
And I press "Delete"
Then I should be on "/admin/structure/cloud_config"
And I should see "Deleted 1 item."
And I should not see the link <aws_link>
Examples:
| aws_link |
| "AWS BDD (N. California)" |
\ No newline at end of file
Feature: List all AWS resources
In order to view the list of AWS resources
As a user
I need to have both Drupal and AWS IAM permissions
@api
Scenario Outline: View the list of AWS resources
Given I am logged in as a user with the <role> role
When I go to "/clouds/aws_cloud/instance"
Then I should get a <code> HTTP response
And I should see the heading <heading>
Examples:
| role | code | heading |
| "Authenticated user" | 403 | "Access denied" |
| "Administrator" | 200 | "All AWS Cloud Instances" |
@api
Scenario: "Administrator" can view the list of AWS resources
Given I am logged in as a user with the "Administrator" role
When I go to "/clouds/aws_cloud/instance"
Then I should see the button "Apply"
And I should see the link "Instances"
Feature: List all Cloud service providers
In order to view the list of Cloud service providers
As a user
I need to be have both Drupal and AWS IAM permissions
@api
Scenario Outline: View the list of Cloud service providers
Given I am logged in as a user with the <role> role
When I go to "/clouds"
Then I should get a <code> HTTP response
And I should see the heading <heading>
Examples:
| role | code | heading |
| "Authenticated user" | 403 | "Access denied" |
| "Administrator" | 200 | "Cloud Service Providers" |
@api
Scenario: "Administrator" can view the list of Cloud service providers
Given I am logged in as a user with the "Administrator" role
When I go to "/clouds"
Then I should see "Location Map"
And I should see the button "Apply"
And I should see the link "Name"
And I should see "Instance Pricing"
Feature: Add Cloud security group
@javascript
Scenario Outline: Add Cloud security group
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/security_group/add"
And I enter <security_group_name> for "Security group name"
And I enter <description> for "Description"
And I select <vpc_name> from "VPC CIDR (ID)"
And I press "Save"
Then the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/security_group/"
And I should see "has been created"
And I click "Inbound and Outbound Rules"
And the url should match "/edit"
And I select <ip_protocol> from "edit-ip-permission-0-ip-protocol"
And I enter <cidr_ip> for "edit-ip-permission-0-cidr-ip"
And I press "Save"
And I wait for AJAX to finish
And the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/security_group/"
And I should see "has been updated"
Examples:
| edit_name | edit_pass | security_group_name | description | vpc_name | ip_protocol | cidr_ip |
| "bdd_user_name" | "bdd_user_pass" | "bdd security group" | "2021" | "Simple VPC" | "All traffic" | "10.0.0.0/24" |
\ No newline at end of file
Feature: Add AWS Cloud Subnet
@javascript
Scenario Outline: Add Cloud Subnet
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/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 enter <ipv4_cidr> for "IPv4 CIDR block"
And I press "Save"
And I wait for AJAX to finish
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/subnet"
And I should see "has been created."
And I should see the link "Public subnet"
Examples:
| edit_name | edit_pass | subnet_name | vpc_name | avail_zone | ipv4_cidr |
| "bdd_user_name" | "bdd_user_pass" | "Public subnet" | "Simple VPC" | "us-west-1a" | "10.0.0.0/24" |
\ No newline at end of file
Feature: Add AWS Cloud VPC
Scenario Outline: Add AWS Cloud VPC
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/vpc/add"
And I enter <vpc_name> for "Name"
And I enter <ipv4_cidr> for "IPv4 CIDR block"
And I press "Save"
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/vpc"
And I should see "has been created."
And I should see the link <vpc>
Examples:
| edit_name | edit_pass | vpc_name | ipv4_cidr |
| "bdd_user_name" | "bdd_user_pass" | "Simple VPC" | "10.0.0.0/24" |
\ No newline at end of file
Feature: Create Launch Templates
@javascript
Scenario Outline: Create Launch Templates
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/design/server_template/aws_bdd_us_west_1/aws_cloud/add"
And I enter <instance_name> for "Name"
And I select <instance_type> from "Instance Type"
And I select <image_link> from "Image ID"
And I select <avail_zone> from "Availability Zone"
And I select <vpc_name> from "VPC"
#And I select "dii-wl-us-west-1" from "VPC"
And I wait for AJAX to finish
And I select <subnet_name> from "Subnet"
#And I select "dii-wl-us-west-1a" from "Subnet"
And I select <security_group_name> from "Security Groups"
#And I select "default" from "Security groups"
And I select <ssh_key_name> from "SSH Key"
And I select <status> from "Status"
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/design/server_template/aws_bdd_us_west_1/"
And I should see "has been created"
And I should see the heading <instance_name>
And I visit "/clouds/design/server_template/aws_bdd_us_west_1"
And I should see the link <instance_name>
Examples:
| edit_name | edit_pass | instance_name | instance_type | image_link | avail_zone | vpc_name | subnet_name | security_group_name | ssh_key_name | status |
| "bdd_user_name" | "bdd_user_pass" | "bdd_instance" | "t3.nano" | "ubuntu-minimal/images/hvm-ssd/ubuntu-focal-20.04-amd64-minimal-20210908" | "us-west-1a" | "Simple VPC" | "Public subnet" | "bdd security group" | "MY_NEW_KEY" | "Review" |
\ No newline at end of file
Feature: Create SSH key pair
Scenario Outline: Create SSH key pair
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/key_pair/add"
And I should see "Add AWS Cloud key pair"
And I enter <ssh_key_name> for "Key pair name"
And I press "Save"
Then the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/key_pair"
And I should see "has been created"
Examples:
| edit_name | edit_pass | ssh_key_name |
| "bdd_user_name" | "bdd_user_pass" | "MY_NEW_KEY" |
\ No newline at end of file
Feature: Import AMI Image
@javascript
Scenario Outline: Import AMI Image
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/images/import"
And I enter <image_id> for "Image IDs"
And I press "Import"
And I wait for AJAX to finish
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/image"
And I should see the link <image_link>
And I should see "Imported 1 images"
Examples:
| edit_name | edit_pass | image_id | image_link |
| "bdd_user_name" | "bdd_user_pass" | "ami-0d12cbe56c129c170" | "ubuntu-minimal/images/hvm-ssd/ubuntu-focal-20.04-amd64-minimal-20210908" |
\ No newline at end of file
Feature: Launch an instance
@javascript
Scenario Outline: Launch an instance
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/design/server_template/aws_bdd_us_west_1"
And I click <instance_name>
And I should see the heading <instance_name>
And I click "Approve"
And the url should match "/approve"
And I press "Approve"
And the url should match "/clouds/design/server_template/aws_bdd_us_west_1/"
And I should see "has been approved"
When I click "Launch"
And the url should match "/launch"
And I check the box "Automatically terminate instance"
And I press "Launch"
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/instance"
And I should see the link <launch_template>
And I click <launch_template>
And the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/instance/"
#And I should see "pending"
#And I reload the page
Examples:
| edit_name | edit_pass | instance_name | launch_template |
| "bdd_user_name" | "bdd_user_pass" | "bdd_instance" | "MY_LAUNCH_TEMPLATE" |
\ No newline at end of file
Feature: Terminate the instance
Scenario Outline: Terminate the instance
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/instance"
And I click <launch_template>
And I click "Stop"
And the url should match "/stop"
And I press "Stop"
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/instance"
And I should see "has been stopped"
And I click <launch_template>
And I should see "stop"
Examples:
| edit_name | edit_pass | launch_template |
| "bdd_user_name" | "bdd_user_pass" | "MY_LAUNCH_TEMPLATE" |
\ No newline at end of file
Feature: View the instance
Scenario Outline: View the instance
Given I am on "/user/login"
And I enter <edit_name> for "edit-name"
And I enter <edit_pass> for "edit-pass"
And I press "Log in"
And the url should match "/user/"
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/instance"
And I click <instance_name>
Then the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/instance/"
And I should see the link "Info"
And I should see the link "Monitor"
And I should see the link "Console Output"
Examples:
| edit_name | edit_pass | instance_name |
| "bdd_user_name" | "bdd_user_pass" | "bdd_instance" |
\ No newline at end of file
Feature: Delete resources created by user to launch EC2 instance
In order to be able to replicate BDD tests
As a user
I need to delete some resources
@api
Scenario Outline: Terminate the instance
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/instance"
And I should see the link <instance_name>
And I click <instance_name>
And the url should match "/instance/"
And I click "Delete" in the "actions"
And the url should match "/terminate"
And I press "Delete | Terminate"
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/instance"
And I should see "has been deleted"
And I should not see the link <instance_name>
Examples:
| role | instance_name |
| "BDD Role" | "BDD_Instance" |
@javascript @api
Scenario Outline: Delete launch template
Given I am logged in as a user with the <role> role
When I visit "/clouds/design/server_template/aws_bdd_us_west_1"
And I should see the link <launch_template>
And I click <launch_template>
And the url should match "/aws_bdd_us_west_1/"
And I click "Delete" in the "nav_tabs"
And the url should match "/delete"
And I press "Delete"
And I wait for AJAX to finish
Then I should be on "/clouds/design/server_template/aws_bdd_us_west_1"
And I should see "has been deleted"
And I should not see the link <launch_template>
Examples:
| role | launch_template |
| "BDD Role" | "BDD_Instance" |
@javascript @api
Scenario Outline: Delete Cloud security group
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/security_group"
And I should see the link <security_group_name>
And I click <security_group_name>
And the url should match "/security_group/"
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/aws_bdd_us_west_1/security_group"
And I should see "has been deleted"
And I should not see the link <security_group_name>
Examples:
| role | security_group_name |
| "BDD Role" | "BDD Security Group" |
@javascript @api
Scenario Outline: Delete Cloud Subnet
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/subnet"
And I should see the link <subnet_name>
And I click <subnet_name>
And the url should match "/subnet/"
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/aws_bdd_us_west_1/subnet"
And I should see "has been deleted"
And I should not see the link <subnet_name>
Examples:
| role | subnet_name |
| "BDD Role" | "BDD Subnet" |
@javascript @api
Scenario Outline: Delete Aws Cloud VPC
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/vpc"
And I should see the link <vpc_name>
And I click <vpc_name>
And the url should match "/vpc/"
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/aws_bdd_us_west_1/vpc"
And I should see "has been deleted"
And I should not see the link <vpc_name>
Examples:
| role | vpc_name |
| "BDD Role" | "BDD VPC" |
@javascript @api
Scenario Outline: Delete AMI Image
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/image"
And I should see the link <image_name>
And I click <image_name>
And the url should match "/image/"
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/aws_bdd_us_west_1/image"
And I should see "has been delete"
And I should not see the link <image_name>
Examples:
| role | image_name |
| "BDD Role" | "ubuntu-minimal/images/hvm-ssd/ubuntu-focal-20.04-amd64-minimal-20211001" |
@javascript @api
Scenario Outline: Delete SSH Key Pair
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/key_pair"
And I should see the link <ssh_key_name>
And I click <ssh_key_name>
And the url should match "/key_pair/"
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/aws_bdd_us_west_1/key_pair"
And I should see "has been deleted"
And I should not see the link <ssh_key_name>
Examples:
| role | ssh_key_name |
| "BDD Role" | "BDD Key" |
Feature: Launch EC2 instance
In order to launch EC2 instance
As a user
I need to create necessary resource
@api
Scenario Outline: Log into the site
Given I am logged in as a user with the <role> role
When I visit "/clouds"
And I should see the heading "Cloud Service Providers"
And I should see the link "All" in the "nav_bar"
And I should see the link "AWS" in the "nav_bar"
Examples:
| role |
| "BDD Role" |
@api
Scenario Outline: Create SSH Key Pair
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/key_pair/add"
And I should see the heading "Add AWS Cloud Key Pair"
And I enter <ssh_key_name> for "Key pair name"
And I press "Save"
Then the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/key_pair"
And I should see "has been created"
And I should see the link <ssh_key_name>
Examples:
| role | ssh_key_name |
| "BDD Role" | "BDD Key" |
@javascript @api
Scenario Outline: Import AMI Image
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/images/import"
And I enter <image_id> for "Image IDs"
And I press "Import"
And I wait for AJAX to finish
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/image"
And I should see "Imported 1 images"
And I should see the link <image_name>
Examples:
| role | image_id | image_name |
| "BDD Role" | "ami-0ffd5d172624ebfe2" | "ubuntu-minimal/images/hvm-ssd/ubuntu-focal-20.04-amd64-minimal-20211001" |
@api
Scenario Outline: Add AWS Cloud VPC
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/vpc/add"
And I enter <vpc_name> for "Name"
And I enter <ipv4_cidr> for "IPv4 CIDR block"
And I press "Save"
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/vpc"
And I should see "has been created"
And I should see the link <vpc_name>
Examples:
| role | vpc_name | ipv4_cidr |
| "BDD Role" | "BDD VPC" | "10.0.0.0/24" |
@javascript @api
Scenario Outline: Add Cloud Subnet
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/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 enter <ipv4_cidr> for "IPv4 CIDR block"
And I press "Save"
And I wait for AJAX to finish
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/subnet"
And I should see "has been created"
And I should see the link <subnet_name>
Examples:
| role | subnet_name | vpc_name | avail_zone | ipv4_cidr |
| "BDD Role" | "BDD Subnet" | "BDD VPC" | "us-west-1a" | "10.0.0.0/24" |
@javascript @api
Scenario Outline: Add Cloud Security Group
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/security_group/add"
And I enter <security_group_name> for "Security group name"
And I enter <description> for "Description"
And I select <vpc_name> from "VPC CIDR (ID)"
And I press "Save"
Then the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/security_group/"
And I should see "has been created"
And I click "Inbound and Outbound Rules"
And the url should match "/edit"
And I select <ip_protocol> from "IP Protocol"
And I enter <cidr_ip> for "CIDR IP"
And I press "Save"
And I wait for AJAX to finish
And the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/security_group/"
And I should see "has been updated"
And I should see the link <security_group_name>
Examples:
| role | security_group_name | description | vpc_name | ip_protocol | cidr_ip |
| "BDD Role" | "BDD Security Group" | "2021" | "BDD VPC" | "All traffic" | "10.0.0.0/24" |
@javascript @api
Scenario Outline: Create Launch Templates
Given I am logged in as a user with the <role> role
When I visit "/clouds/design/server_template/aws_bdd_us_west_1/aws_cloud/add"
And I should see the heading "Add AWS Cloud"
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 <vpc_name> from "VPC"
And I wait for AJAX to finish
And I select <subnet_name> from "Subnet"
And I select <security_group_name> from "Security Groups"
And I select <ssh_key_name> from "SSH Key"
And I select <status> from "Status"
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/design/server_template/aws_bdd_us_west_1/"
And I should see "has been created"
And I should see the heading <instance_name>
And I visit "/clouds/design/server_template/aws_bdd_us_west_1"
And I should see the link <instance_name>
Examples:
| role | instance_name | instance_type | image_name | avail_zone | vpc_name | subnet_name | security_group_name | ssh_key_name | status |
| "BDD Role" | "BDD_Instance" | "t3.nano" | "ubuntu-minimal/images/hvm-ssd/ubuntu-focal-20.04-amd64-minimal-20211001" | "us-west-1a" | "BDD VPC" | "BDD Subnet" | "BDD Security Group" | "BDD Key" | "Review" |
@javascript @api
Scenario Outline: Launch an instance
Given I am logged in as a user with the <role> role
When I visit "/clouds/design/server_template/aws_bdd_us_west_1"
And I click <instance_name>
And I should see the heading <instance_name>
And I click "Approve"
And the url should match "/approve"
And I press "Approve"
And the url should match "/clouds/design/server_template/aws_bdd_us_west_1/"
And I should see "has been approved"
When I click "Launch"
And the url should match "/launch"
And I check the box "Automatically terminate instance"
And I press "Launch"
Then I should be on "/clouds/aws_cloud/aws_bdd_us_west_1/instance"
And I should see "pending"
Examples:
| role | instance_name |
| "BDD Role" | "BDD_Instance" |
@api
Scenario Outline: View the instance
Given I am logged in as a user with the <role> role
When I visit "/clouds/aws_cloud/aws_bdd_us_west_1/instance"
And I click <instance_name>
Then the url should match "/clouds/aws_cloud/aws_bdd_us_west_1/instance/"
And I should see the link "Info"
And I should see the link "Monitor"
And I should see the link "Console Output"
Examples:
| role | instance_name |
| "BDD Role" | "BDD_Instance" |
......@@ -50,12 +50,14 @@ default:
api_driver: 'drupal'
drush:
alias: 'local'
#drupal:
# drupal:
# Uncomment or set to $BEHAT_PARAMS (recommended).
# drupal_root: '/var/www/html/web'
region_map:
nav_bar: ".navbar-collapse"
nav_tabs: ".tabs"
footer: ".footer"
actions: ".list-inline.local-actions"
selectors:
message_selector: '.messages'
error_message_selector: '.messages.messages--error'
......
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