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

Remove hardcoded AMI IDs from data_source_aws_instance_test #14145

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Jul 10, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates #11126
Central management issue: #12994

Release note for CHANGELOG:

NONE

See AWSAT002

Current stats of acceptance tests for this PR:

Partition Passing Failing Test
us-gov 14 6 With-PR
us-gov 9 11 Pre-PR
standard 20 0 With-PR
standard 20 0 Pre-PR

@YakDriver YakDriver requested a review from a team July 10, 2020 21:05
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jul 10, 2020
@bflad bflad self-assigned this Jul 27, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Otherwise, looks good. 🚀

Output from acceptance testing in AWS Commercial:

--- FAIL: TestAccAWSInstanceDataSource_secondaryPrivateIPs (17.16s)
--- PASS: TestAccAWSInstanceDataSource_PlacementGroup (76.83s)
--- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (101.23s)
--- PASS: TestAccAWSInstanceDataSource_privateIP (103.59s)
--- PASS: TestAccAWSInstanceDataSource_RootBlockDevice_KmsKeyId (105.78s)
--- PASS: TestAccAWSInstanceDataSource_creditSpecification (113.60s)
--- PASS: TestAccAWSInstanceDataSource_VPC (118.67s)
--- PASS: TestAccAWSInstanceDataSource_EbsBlockDevice_KmsKeyId (122.56s)
--- PASS: TestAccAWSInstanceDataSource_blockDevices (122.68s)
--- PASS: TestAccAWSInstanceDataSource_AzUserData (122.91s)
--- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (123.34s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData (125.23s)
--- PASS: TestAccAWSInstanceDataSource_SecurityGroups (125.66s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData_NoUserData (130.14s)
--- PASS: TestAccAWSInstanceDataSource_tags (134.25s)
--- PASS: TestAccAWSInstanceDataSource_metadataOptions (125.22s)
--- PASS: TestAccAWSInstanceDataSource_basic (143.17s)
--- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (143.38s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_trueToFalse (156.18s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_falseToTrue (163.11s)
--- PASS: TestAccAWSInstanceDataSource_keyPair (182.89s)

Output from acceptance testing in AWS GovCloud (US) (other test failures related to other tech debt like hardcoded AZs):

--- FAIL: TestAccAWSInstanceDataSource_AzUserData (9.15s)
--- FAIL: TestAccAWSInstanceDataSource_VPC (10.06s)
--- FAIL: TestAccAWSInstanceDataSource_secondaryPrivateIPs (15.15s)
--- FAIL: TestAccAWSInstanceDataSource_VPCSecurityGroups (26.15s)
--- PASS: TestAccAWSInstanceDataSource_PlacementGroup (62.73s)
--- PASS: TestAccAWSInstanceDataSource_keyPair (67.84s)
--- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (75.32s)
--- PASS: TestAccAWSInstanceDataSource_EbsBlockDevice_KmsKeyId (76.20s)
--- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (78.40s)
--- PASS: TestAccAWSInstanceDataSource_RootBlockDevice_KmsKeyId (87.29s)
--- PASS: TestAccAWSInstanceDataSource_privateIP (88.67s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData (83.50s)
--- PASS: TestAccAWSInstanceDataSource_SecurityGroups (101.95s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData_NoUserData (77.26s)
--- PASS: TestAccAWSInstanceDataSource_blockDevices (104.03s)
--- PASS: TestAccAWSInstanceDataSource_tags (107.74s)
--- PASS: TestAccAWSInstanceDataSource_creditSpecification (60.68s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_falseToTrue (123.34s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_trueToFalse (125.66s)
--- PASS: TestAccAWSInstanceDataSource_basic (199.59s)
--- PASS: TestAccAWSInstanceDataSource_metadataOptions (301.61s)

@@ -687,7 +680,7 @@ data "aws_instance" "test" {
}

func testAccInstanceDataSourceConfig_secondaryPrivateIPs(rName string) string {
return testAccLatestAmazonLinuxHvmEbsAmiConfig() + testAccAwsInstanceVpcConfig(rName, false) + `
return testAccLatestAmazonLinuxHvmEbsAmiConfig() + testAccAwsInstanceVpcConfigBasic(rName) + `
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah sorry in trying to fix the merge conflicts, I switched this over to the new function and the hardcoded IP a few lines down needs the same treatment as the one a few lines up.

TestAccAWSInstanceDataSource_secondaryPrivateIPs: testing.go:684: Step 0 error: errors during apply:
Error: Error launching source instance: InvalidParameterValue: Address 10.1.1.42 does not fall within the subnet's address range

@YakDriver YakDriver force-pushed the harddatainstance branch 2 times, most recently from 9e908d2 to d5b707e Compare July 27, 2020 22:00
@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Jul 27, 2020
@YakDriver
Copy link
Member Author

Latest:

On commercial partition:

--- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (86.93s)
--- PASS: TestAccAWSInstanceDataSource_keyPair (90.98s)
--- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (97.15s)
--- PASS: TestAccAWSInstanceDataSource_blockDevices (98.06s)
--- PASS: TestAccAWSInstanceDataSource_PlacementGroup (100.78s)
--- PASS: TestAccAWSInstanceDataSource_EbsBlockDevice_KmsKeyId (102.02s)
--- PASS: TestAccAWSInstanceDataSource_RootBlockDevice_KmsKeyId (108.83s)
--- PASS: TestAccAWSInstanceDataSource_tags (109.92s)
--- PASS: TestAccAWSInstanceDataSource_secondaryPrivateIPs (120.58s)
--- PASS: TestAccAWSInstanceDataSource_privateIP (120.80s)
--- PASS: TestAccAWSInstanceDataSource_AzUserData (122.79s)
--- PASS: TestAccAWSInstanceDataSource_VPC (124.68s)
--- PASS: TestAccAWSInstanceDataSource_basic (126.29s)
--- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (128.37s)
--- PASS: TestAccAWSInstanceDataSource_creditSpecification (128.71s)
--- PASS: TestAccAWSInstanceDataSource_metadataOptions (132.97s)
--- PASS: TestAccAWSInstanceDataSource_SecurityGroups (138.90s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData (165.56s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_falseToTrue (166.02s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData_NoUserData (182.01s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_trueToFalse (233.42s)

On GovCloud:

--- PASS: TestAccAWSInstanceDataSource_metadataOptions (97.20s)
--- PASS: TestAccAWSInstanceDataSource_AzUserData (97.24s)
--- PASS: TestAccAWSInstanceDataSource_keyPair (99.67s)
--- PASS: TestAccAWSInstanceDataSource_PlacementGroup (105.10s)
--- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (105.54s)
--- PASS: TestAccAWSInstanceDataSource_EbsBlockDevice_KmsKeyId (116.35s)
--- PASS: TestAccAWSInstanceDataSource_VPC (116.52s)
--- PASS: TestAccAWSInstanceDataSource_privateIP (116.58s)
--- PASS: TestAccAWSInstanceDataSource_blockDevices (117.22s)
--- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (117.58s)
--- PASS: TestAccAWSInstanceDataSource_secondaryPrivateIPs (119.68s)
--- PASS: TestAccAWSInstanceDataSource_creditSpecification (120.45s)
--- PASS: TestAccAWSInstanceDataSource_SecurityGroups (121.30s)
--- PASS: TestAccAWSInstanceDataSource_RootBlockDevice_KmsKeyId (124.65s)
--- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (127.63s)
--- PASS: TestAccAWSInstanceDataSource_basic (146.54s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_falseToTrue (149.43s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData (174.65s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_trueToFalse (184.54s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData_NoUserData (189.37s)
--- PASS: TestAccAWSInstanceDataSource_tags (110.95s)

@YakDriver YakDriver merged commit 73af263 into hashicorp:master Jul 27, 2020
@YakDriver YakDriver deleted the harddatainstance branch July 27, 2020 22:39
@YakDriver YakDriver added the partition/aws-us-gov Pertains to the aws-us-gov partition. label Aug 27, 2020
@ghost
Copy link

ghost commented Aug 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/ec2 Issues and PRs that pertain to the ec2 service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants