-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/provider: Remove hardcoded us-west-2 provider declarations in t…
…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) ```
- Loading branch information
Showing
16 changed files
with
0 additions
and
100 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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