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 extraneously hardcoded provider configurations…
… in test configurations (#12277) Reference: #8983 Reference: https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#writing-and-running-cross-region-acceptance-tests This is the first round of tfproviderlint AT004 fixes. Remaining reports will require some additional design work, e.g. potentially creating a separate EC2 Classic provider in the acceptance testing framework. Previously: ``` aws/data_source_aws_elastic_beanstalk_hosted_zone_test.go:42:75: AT004: provider declaration should be omitted aws/provider_test.go:425:21: AT004: provider declaration should be omitted ... aws/provider_test.go:1259:21: AT004: provider declaration should be omitted aws/resource_aws_ami_from_instance_test.go:131:21: AT004: provider declaration should be omitted aws/resource_aws_codecommit_trigger_test.go:84:40: AT004: provider declaration should be omitted aws/resource_aws_dynamodb_global_table_test.go:186:21: AT004: provider declaration should be omitted aws/resource_aws_eip_test.go:999:21: AT004: provider declaration should be aws/resource_aws_pinpoint_adm_channel_test.go:115:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_apns_channel_test.go:197:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_apns_channel_test.go:215:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_apns_sandbox_channel_test.go:197:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_apns_sandbox_channel_test.go:215:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_apns_voip_channel_test.go:197:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_apns_voip_channel_test.go:215:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_apns_voip_sandbox_channel_test.go:197:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_apns_voip_sandbox_channel_test.go:215:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_baidu_channel_test.go:109:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_baidu_channel_test.go:91:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_email_channel_test.go:141:53: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_email_channel_test.go:83:52: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_event_stream_test.go:136:52: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_event_stream_test.go:79:51: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_gcm_channel_test.go:95:21: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_sms_channel_test.go:146:50: AT004: provider declaration should be omitted aws/resource_aws_pinpoint_sms_channel_test.go:158:21: AT004: provider declaration should be omitted aws/resource_aws_rds_cluster_test.go:2796:21: AT004: provider declaration should be omitted aws/resource_aws_route53_zone_association_test.go:267:51: AT004: provider declaration should be omitted aws/resource_aws_s3_bucket_test.go:2772:21: AT004: provider declaration should be omitted aws/resource_aws_s3_bucket_test.go:3268:50: AT004: provider declaration should be omitted ``` Output from acceptance testing: ``` --- PASS: TestAccAWSDataSourceElasticBeanstalkHostedZone_basic (15.30s) --- PASS: TestAccAWSDataSourceElasticBeanstalkHostedZone_Region (19.40s) --- PASS: TestAccAWSAMIFromInstance_basic (458.33s) --- PASS: TestAccAWSAMIFromInstance_tags (459.26s) --- PASS: TestAccAWSCodeCommitTrigger_basic (16.98s) --- PASS: TestAccAWSDynamoDbGlobalTable_multipleRegions (107.60s) --- PASS: TestAccAWSEIP_Instance_Reassociate (120.78s) --- SKIP: TestAccAWSPinpointADMChannel_basic (0.00s) resource_aws_pinpoint_adm_channel_test.go:30: ADM_CLIENT_ID ENV is missing --- SKIP: TestAccAWSPinpointAPNSChannel_basicCertificate (0.00s) resource_aws_pinpoint_apns_channel_test.go:58: Pinpoint certificate credentials envs are missing, skipping test --- SKIP: TestAccAWSPinpointAPNSChannel_basicToken (0.00s) resource_aws_pinpoint_apns_channel_test.go:66: APNS_BUNDLE_ID env is missing, skipping test --- SKIP: TestAccAWSPinpointAPNSSandboxChannel_basicCertificate (0.00s) resource_aws_pinpoint_apns_sandbox_channel_test.go:58: Pinpoint certificate credentials envs are missing, skipping test --- SKIP: TestAccAWSPinpointAPNSSandboxChannel_basicToken (0.00s) resource_aws_pinpoint_apns_sandbox_channel_test.go:66: APNS_SANDBOX_BUNDLE_ID env is missing, skipping test --- SKIP: TestAccAWSPinpointAPNSVoipChannel_basicCertificate (0.00s) resource_aws_pinpoint_apns_voip_channel_test.go:58: Pinpoint certificate credentials envs are missing, skipping test --- SKIP: TestAccAWSPinpointAPNSVoipChannel_basicToken (0.00s) resource_aws_pinpoint_apns_voip_channel_test.go:66: APNS_VOIP_BUNDLE_ID env is missing, skipping test --- SKIP: TestAccAWSPinpointAPNSVoipSandboxChannel_basicCertificate (0.00s) resource_aws_pinpoint_apns_voip_sandbox_channel_test.go:58: Pinpoint certificate credentials envs are missing, skipping test --- SKIP: TestAccAWSPinpointAPNSVoipSandboxChannel_basicToken (0.00s) resource_aws_pinpoint_apns_voip_sandbox_channel_test.go:66: APNS_VOIP_BUNDLE_ID env is missing, skipping test --- SKIP: TestAccAWSPinpointGCMChannel_basic (0.00s) resource_aws_pinpoint_gcm_channel_test.go:26: GCM_API_KEY env missing, skip test --- PASS: TestAccAWSPinpointApp_basic (18.30s) --- PASS: TestAccAWSPinpointApp_CampaignHookLambda (51.62s) --- PASS: TestAccAWSPinpointApp_Limits (16.81s) --- PASS: TestAccAWSPinpointApp_QuietTime (16.39s) --- PASS: TestAccAWSPinpointApp_Tags (39.82s) --- PASS: TestAccAWSPinpointBaiduChannel_basic (27.75s) --- PASS: TestAccAWSPinpointEmailChannel_basic (31.77s) --- PASS: TestAccAWSPinpointEventStream_basic (192.97s) --- PASS: TestAccAWSPinpointSMSChannel_basic (27.71s) --- PASS: TestAccAWSPinpointSMSChannel_full (29.13s) --- PASS: TestAccAWSRDSCluster_EncryptedCrossRegionReplication (1593.29s) --- PASS: TestAccAWSRoute53ZoneAssociation_region (161.54s) --- PASS: TestAccAWSS3Bucket_region (38.19s) --- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (28.48s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutPrefix (55.65s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutStorageClass (56.38s) --- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlTranslation (108.97s) --- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (161.13s) --- PASS: TestAccAWSS3Bucket_Replication (172.15s) ``` In a region where Pinpoint is not supported, all tests continue to skip: ``` --- SKIP: TestAccAWSPinpointApp_basic (27.81s) resource_aws_pinpoint_app_test.go:228: skipping acceptance testing: RequestError: send request failed caused by: Get https://pinpoint.us-east-2.amazonaws.com/v1/apps: dial tcp: lookup pinpoint.us-east-2.amazonaws.com: no such host ```
- Loading branch information