-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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 extraneously hardcoded provider configurations in test configurations #12277
Conversation
… in test configurations 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 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
--- PASS: TestAccAWSDataSourceElasticBeanstalkHostedZone_Region (25.10s)
--- PASS: TestAccAWSDataSourceElasticBeanstalkHostedZone_basic (19.09s)
--- PASS: TestAccAWSAMIFromInstance_basic (411.45s)
--- PASS: TestAccAWSAMIFromInstance_tags (418.03s)
--- PASS: TestAccAWSCodeCommitTrigger_basic (18.76s)
--- PASS: TestAccAWSDynamoDbGlobalTable_basic (62.20s)
--- PASS: TestAccAWSDynamoDbGlobalTable_multipleRegions (108.66s)
--- PASS: TestAccAWSEIP_Instance_Reassociate (68.62s)
--- PASS: TestAccAWSPinpointApp_CampaignHookLambda (36.18s)
--- PASS: TestAccAWSPinpointApp_Limits (9.57s)
--- PASS: TestAccAWSPinpointApp_QuietTime (10.65s)
--- PASS: TestAccAWSPinpointApp_Tags (22.93s)
--- PASS: TestAccAWSPinpointApp_basic (11.27s)
--- SKIP: TestAccAWSPinpointADMChannel_basic (0.00s)
--- SKIP: TestAccAWSPinpointAPNSChannel_basicCertificate (0.00s)
--- SKIP: TestAccAWSPinpointAPNSChannel_basicToken (0.00s)
--- SKIP: TestAccAWSPinpointAPNSSandboxChannel_basicCertificate (0.00s)
--- SKIP: TestAccAWSPinpointAPNSSandboxChannel_basicToken (0.00s)
--- SKIP: TestAccAWSPinpointAPNSVoipChannel_basicCertificate (0.00s)
--- SKIP: TestAccAWSPinpointAPNSVoipChannel_basicToken (0.00s)
--- SKIP: TestAccAWSPinpointAPNSVoipSandboxChannel_basicCertificate (0.00s)
--- SKIP: TestAccAWSPinpointAPNSVoipSandboxChannel_basicToken (0.00s)
--- SKIP: TestAccAWSPinpointGCMChannel_basic (0.00s)
--- PASS: TestAccAWSPinpointBaiduChannel_basic (16.45s)
--- PASS: TestAccAWSPinpointEmailChannel_basic (20.79s)
--- PASS: TestAccAWSPinpointEventStream_basic (139.48s)
--- PASS: TestAccAWSPinpointSMSChannel_basic (17.95s)
--- PASS: TestAccAWSPinpointSMSChannel_full (17.05s)
--- PASS: TestAccAWSRDSCluster_EncryptedCrossRegionReplication (1623.83s)
--- PASS: TestAccAWSRoute53ZoneAssociation_region (170.43s)
--- PASS: TestAccAWSS3Bucket_region (17.63s)
--- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (26.86s)
--- PASS: TestAccAWSS3Bucket_Replication (134.67s)
--- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlTranslation (89.65s)
--- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (111.71s)
--- PASS: TestAccAWSS3Bucket_ReplicationWithoutPrefix (44.74s)
--- PASS: TestAccAWSS3Bucket_ReplicationWithoutStorageClass (41.48s)
This has been released in version 2.53.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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! |
Community Note
Reference: #8983
Reference: https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#writing-and-running-cross-region-acceptance-tests
Release note for CHANGELOG:
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:
Output from acceptance testing:
In a region where Pinpoint is not supported, all tests continue to skip: