Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update name of subnet fixture, fixing 3 failing integration tests #2765

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

clintoncwolfe
Copy link
Contributor

The AWS integration tests were failing on 3 controls, all related to the aws_subnet resource. Here's a sample:

[cwolfe@lodi inspec]$ bundle exec  bin/inspec exec test/integration/aws/default/verify/controls/aws_subnet.rb --attrs test/integration/aws/default/.attribute.yml -t aws://us-east-2/some-profile

Profile: tests from test/integration/aws/default/verify/controls/aws_subnet.rb (tests from test.integration.aws.default.verify.controls.aws_subnet.rb)
Version: (not specified)
Target:  aws://us-east-2

  ×  aws_subnet recall of subnet_01: VPC Subnet  (2 failed)
     ×  VPC Subnet
     aws_subnet Subnet ID must be in the format "subnet-" followed by 8 hexadecimal characters.
     ×  VPC Subnet
     aws_subnet Subnet ID must be in the format "subnet-" followed by 8 hexadecimal characters.
     ✔  VPC Subnet subnet-00000000 should not exist
  ×  aws_subnet properties of subnet_01: VPC Subnet
     ×  VPC Subnet
     aws_subnet Subnet ID must be in the format "subnet-" followed by 8 hexadecimal characters.
  ×  aws_subnet matchers of subnet_01: VPC Subnet
     ×  VPC Subnet
     aws_subnet Subnet ID must be in the format "subnet-" followed by 8 hexadecimal characters.


Profile Summary: 0 successful controls, 3 control failures, 0 controls skipped
Test Summary: 1 successful, 4 failures, 0 skipped

There wasn't anything wrong with the resource; the integration test file was simply looking for the wrong InSpec attribute to figure out the test fixture subnet.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
@clintoncwolfe clintoncwolfe requested a review from a team as a code owner March 1, 2018 21:42
Copy link
Contributor

@jquick jquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @clintoncwolfe !

Copy link
Contributor

@jerryaldrichiii jerryaldrichiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch @clintoncwolfe! Looks good to me.

@jquick jquick merged commit 89ce851 into master Mar 2, 2018
@jquick jquick deleted the cw/subnet-integration-test-fixes branch March 2, 2018 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants