Problem/Motivation

We want to test all the acceptance tests using the docker container that Kumiko setup for QA.
This patch modifies the following files
1. /tests/src/Behat/features/admin/AdminCheckCleanState.feature

  • Login and log out on the clean state
  • List all Cloud service providers on the clean state
  • List all AWS resources on the clean state

2. /modules/cloud_service_providers/aws_cloud/tests/src/Behat/features/admin/AdminCreateResources.feature

  • Add an AWS Cloud service provider named AWS BDD
  • Create a role named BDD Role that contains the access permissions to the AWS Cloud service provider AWS BDD and view own instance

3. /modules/cloud_service_providers/aws_cloud/tests/src/Behat/features/admin/AdminCheckResources.feature

  • Login and log out on the ongoing state
  • List all Cloud service providers on the ongoing state
  • List all AWS resources on the ongoing state

4. /modules/cloud_service_providers/aws_cloud/tests/src/Behat/features/user/UserLaunchInstance.feature

  • Create SSH key pair named BDD Key
  • Import AMI Image
  • Add Cloud VPC named BDD VPC
  • Add Cloud subnet named BDD Subnet
  • Add Cloud security group named BDD Security Group
  • Create launch template named BDD_Instance
  • Launch the EC2 instance named BDD_Instance
  • View the instance BDD_Instance

5. /modules/cloud_service_providers/aws_cloud/tests/src/Behat/features/user/UserDeleteResources.feature

  • Terminate the instance named BDD_Instance
  • Delete the launch template named BDD_Instance
  • Delete the Cloud security group named BDD Security Group
  • Delete the Cloud subnet named BDD Subnet
  • Delete the Cloud VPC named BDD VPC
  • Delete AMI Image
  • Delete the SSH key pair named BDD Key

6.

/modules/cloud_service_providers/aws_cloud/tests/src/Behat/features/admin/AdminDeleteResources.feature
  • Delete the role named BDD Role
  • Delete the AWS Cloud service provider named AWS BDD

7. /modules/cloud_service_providers/aws_cloud/images/bdd/design/behat/scenarios.png

CommentFileSizeAuthor
#20 3239248-20.patch357.87 KByas

Issue fork cloud-3239248

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yutong.li created an issue. See original summary.

yutong.li credited yas.

yutong.li’s picture

yutong.li’s picture

Issue summary: View changes
yutong.li’s picture

Issue summary: View changes

yutong.li’s picture

Status: Active » Needs review
yas’s picture

Status: Needs review » Needs work

@yutong.li

The patch looks behind. Could you please rebase the branch? Thanks!

yas’s picture

Title: Test all acceptance tests on the QA docker container » Add acceptance tests to launch an instance in AWS Cloud
yutong.li’s picture

Status: Needs work » Needs review
yas’s picture

@yutong.li

Thank you for the update. The patch looks good to me.

@kumikoono

Could you please review the patch? Thanks

kumikoono’s picture

@yutong Thanks for this work. Please check my comments.

kumikoono’s picture

@yutong, Thanks for your update. It looks good to me.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@kumikoono

Thank you for your review.

@yutong.li

Changing the status to RTBC and I'll merge the patch to 4.x and close this issue as Fixed.

yas’s picture

Status: Reviewed & tested by the community » Needs work

@yutong.li

I found that there are some places that we need to fix. Please check my comments above and the errors shown in below. I change back the status to Needs work. Thanks!

$ ./vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,feature "${CODE_DIR}"
FILE: ...Behat/features/examples/admin/AddAwsCloudServiceProvider.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 26 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...at/features/examples/admin/DeleteAwsCloudServiceProvider.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 17 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...loud/tests/src/Behat/features/examples/user/ViewInstance.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 18 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ud/tests/src/Behat/features/examples/user/LaunchInstance.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 31 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ud/tests/src/Behat/features/examples/user/AddCloudSubnet.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 23 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s/src/Behat/features/examples/user/AddCloudSecurityGroup.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 28 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../tests/src/Behat/features/examples/user/CreateSshKeyPair.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 18 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...cloud/tests/src/Behat/features/examples/user/AddCloudVpc.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 19 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...tests/src/Behat/features/examples/user/TerminateInstance.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 21 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ts/src/Behat/features/examples/user/CreateLaunchTemplate.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 34 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ud/tests/src/Behat/features/examples/user/ImportAmiImage.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 20 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...cloud/tests/src/Behat/features/examples/admin/CreateRole.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 29 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...loud/tests/src/Behat/features/examples/admin/LoginLogout.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 43 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...d/tests/src/Behat/features/examples/admin/CreateTestUser.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 28 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...tions/cloud/tests/src/Behat/features/examples/user/Login.feature
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 15 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 33.32 secs; Memory: 54.01MB
yutong.li’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Needs work

@yutong.li

Sorry, I was confused about the phpcs messages, which reported the existing example feature files. Could you please revert the patch by removing the blank line at the end of the files that you added this time? Thanks!

yutong.li’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new357.87 KB

@yutong.li

Thank you for the update. It looks good now, let me upload the patch incl. png file which is encoded from binary to text.

  • yas committed 7bb2d12 on 4.x authored by yutong.li
    Issue #3239248 by yutong.li, yas, kumikoono: Add acceptance tests to...

yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.