-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
tests/provider: Remove hardcoded us-west-2 provider declarations in test configurations #9075
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…est configurations Reference: #8983 Test configurations should omit `provider "aws"` declarations as these: * Prevents the same configuration from successfully running against multiple AWS partitions (e.g. AWS Commercial and AWS GovCloud (US)) * Reconfigure the default testing provider configuration, which can cause unexpected behavior across multiple tests In this pass, we cleanup the trivial cases of `region = "us-west-2"` declarations, which matches the default region the acceptance testing framework is configured. As an added benefit of these changes, some of these tests may begin passing in AWS GovCloud (US) and other partitions. Future updates will handle hardcoded region and availability zone testing. Previously from `tfproviderlint -AT004 ./aws` (only relevant failures shown): ``` aws/data_source_aws_availability_zone_test.go:35:52: AT004: provider declaration should be omitted aws/data_source_aws_canonical_user_id_test.go:44:51: AT004: provider declaration should be omitted aws/data_source_aws_kms_ciphertext_test.go:57:55: AT004: provider declaration should be omitted aws/data_source_aws_kms_ciphertext_test.go:74:58: AT004: provider declaration should be omitted aws/data_source_aws_kms_ciphertext_test.go:92:70: AT004: provider declaration should be omitted aws/data_source_aws_nat_gateway_test.go:45:21: AT004: provider declaration should be omitted aws/data_source_aws_prefix_list_test.go:60:46: AT004: provider declaration should be omitted aws/data_source_aws_sns_test.go:52:44: AT004: provider declaration should be omitted aws/data_source_aws_vpc_test.go:134:21: AT004: provider declaration should be omitted aws/data_source_aws_vpc_test.go:155:21: AT004: provider declaration should be omitted aws/resource_aws_autoscaling_group_test.go:2481:67: AT004: provider declaration should be omitted aws/resource_aws_autoscaling_group_test.go:2624:21: AT004: provider declaration should be omitted aws/resource_aws_default_route_table_test.go:241:41: AT004: provider declaration should be omitted aws/resource_aws_default_route_table_test.go:291:45: AT004: provider declaration should be omitted aws/resource_aws_default_route_table_test.go:384:47: AT004: provider declaration should be omitted aws/resource_aws_default_vpc_test.go:50:41: AT004: provider declaration should be omitted aws/resource_aws_elb_test.go:1680:37: AT004: provider declaration should be omitted aws/resource_aws_elb_test.go:1751:41: AT004: provider declaration should be omitted aws/resource_aws_opsworks_custom_layer_test.go:349:21: AT004: provider declaration should be omitted aws/resource_aws_opsworks_rails_app_layer_test.go:79:21: AT004: provider declaration should be omitted aws/resource_aws_opsworks_rails_app_layer_test.go:103:21: AT004: provider declaration should be omitted aws/resource_aws_opsworks_stack_test.go:726:21: AT004: provider declaration should be omitted aws/resource_aws_opsworks_stack_test.go:819:21: AT004: provider declaration should be omitted aws/resource_aws_subnet_test.go:456:47: AT004: provider declaration should be omitted aws/resource_aws_vpc_endpoint_route_table_association_test.go:105:55: AT004: provider declaration should be omitted ``` Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (81.06s) --- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (372.99s) --- PASS: TestAccAWSDefaultRouteTable_basic (77.18s) --- PASS: TestAccAWSDefaultRouteTable_Route_TransitGatewayID (314.28s) --- PASS: TestAccAWSDefaultRouteTable_swap (62.06s) --- PASS: TestAccAWSDefaultRouteTable_vpc_endpoint (44.30s) --- PASS: TestAccAWSDefaultVpc_basic (23.95s) --- PASS: TestAccAWSELB_swap_subnets (74.50s) --- PASS: TestAccAWSOpsworksCustomLayer_importBasic (42.93s) --- PASS: TestAccAWSOpsworksRailsAppLayer (59.16s) --- PASS: TestAccAWSOpsworksStackNoVpcCreateTags (36.37s) --- PASS: TestAccAWSSubnet_availabilityZoneId (32.60s) --- PASS: TestAccAWSVpcEndpointRouteTableAssociation_basic (44.86s) --- PASS: TestAccDataSourceAwsAvailabilityZone (12.31s) --- PASS: TestAccDataSourceAwsCanonicalUserId_basic (11.20s) --- PASS: TestAccDataSourceAwsKmsCiphertext_basic (39.08s) --- PASS: TestAccDataSourceAwsKmsCiphertext_validate (39.13s) --- PASS: TestAccDataSourceAwsKmsCiphertext_validate_withContext (39.34s) --- PASS: TestAccDataSourceAwsNatGateway (215.82s) --- PASS: TestAccDataSourceAwsPrefixList (11.04s) --- PASS: TestAccDataSourceAwsSnsTopic (14.32s) --- PASS: TestAccDataSourceAwsVpc_basic (36.01s) --- PASS: TestAccDataSourceAwsVpc_ipv6Associated (34.89s) --- PASS: TestAccDataSourceAwsVpc_multipleCidr (53.00s) ```
ghost
added
size/M
Managed by automation to categorize the size of a PR.
service/autoscaling
Issues and PRs that pertain to the autoscaling service.
service/ec2
Issues and PRs that pertain to the ec2 service.
service/elb
Issues and PRs that pertain to the elb service.
service/kms
Issues and PRs that pertain to the kms service.
service/opsworks
Issues and PRs that pertain to the opsworks service.
service/s3
Issues and PRs that pertain to the s3 service.
service/sns
Issues and PRs that pertain to the sns service.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
labels
Jun 21, 2019
nywilken
approved these changes
Jul 10, 2019
Nice first past 👍 |
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
locked and limited conversation to collaborators
Nov 2, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
service/autoscaling
Issues and PRs that pertain to the autoscaling service.
service/ec2
Issues and PRs that pertain to the ec2 service.
service/elb
Issues and PRs that pertain to the elb service.
service/kms
Issues and PRs that pertain to the kms service.
service/opsworks
Issues and PRs that pertain to the opsworks service.
service/s3
Issues and PRs that pertain to the s3 service.
service/sns
Issues and PRs that pertain to the sns service.
size/M
Managed by automation to categorize the size of a PR.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Community Note
Reference: #8983
Test configurations should omit
provider "aws"
declarations as these:In this pass, we cleanup the trivial cases of
region = "us-west-2"
declarations, which matches the default region the acceptance testing framework is configured. As an added benefit of these changes, some of these tests may begin passing in AWS GovCloud (US) and other partitions. Future updates will handle hardcoded region and availability zone testing.Previously from
tfproviderlint -AT004 ./aws
(only relevant failures shown):Release note for CHANGELOG:
Output from acceptance testing in AWS Commercial: