You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/provider: Migrate additional tests to newer ProviderFactories setup and PreCheck functions (#15877)
Reference: #8316
Reference: #15737
Reference: #15791
This creates the remaining special `ProviderFactories` functions (as they need to exist currently), updates the Contributing Guide documentation, and migrates a portion of the tests over to them. Further changesets will continue these efforts by:
* Migrating the rest of the `awsalternate` provider test configurations to `testAccProviderFactoriesAlternate()`
* Migrating the rest of the `testAccMultipleRegionsPreCheck()` and `testAccAlternateRegionPreCheck()` usage to `testAccMultipleRegionPreCheck()` (bundling with the above as its fairly common together)
* Flipping `testAccProviderFactories` to a variable with only the `aws` provider and replacing `testAccProviderFactoriesEc2Classic` and `testAccProviderFactoriesCur()`
* Continuing efforts to remove environment variable handling in test functions
Output from acceptance testing in AWS Commercial:
```
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion (20.85s)
--- PASS: TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn (157.90s)
--- PASS: TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn_ConflictsWithCloudFrontDefaultCertificate (157.61s)
--- FAIL: TestAccAWSDBInstance_DbSubnetGroupName_RamShared (18.95s)
resource_aws_db_instance_test.go:352: Step 1/1 error: Error running apply: 2020/10/27 23:13:26 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error associating principal with RAM resource share: UnknownResourceException: Organization o-upyv668dz5 could not be found.
Error: error associating RAM Resource Share: InvalidParameterException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.
Error: error associating RAM Resource Share: InvalidParameterException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.
--- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName_RamShared (604.80s)
resource_aws_db_instance_test.go:808: Step 1/1 error: Error running apply: 2020/10/27 21:59:55 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error associating principal with RAM resource share: UnknownResourceException: Organization o-upyv668dz5 could not be found.
Error: error associating RAM Resource Share: InvalidParameterException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.
Error: error associating RAM Resource Share: InvalidParameterException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_DbSubnetGroupName_RamShared (615.89s)
resource_aws_db_instance_test.go:1437: Step 1/1 error: Error running apply: 2020/10/27 23:13:26 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error associating principal with RAM resource share: UnknownResourceException: Organization o-upyv668dz5 could not be found.
Error: error associating RAM Resource Share: InvalidParameterException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.
Error: error associating RAM Resource Share: InvalidParameterException: The resource you are attempting to share can only be shared within your AWS Organization. This error may also occur if you have not enabled sharing with your AWS organization, or that onboarding process is still in progress.
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName (2252.27s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName_VpcSecurityGroupIds (1908.33s)
--- PASS: TestAccAWSDynamoDbTable_Replica_Multiple (766.22s)
--- PASS: TestAccAWSDynamoDbTable_Replica_Single (412.01s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachment_basic (376.21s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachment_differentAccount (360.55s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachment_disappears (363.16s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachment_Tags_sameAccount (365.29s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachmentAccepter_basic_differentAccount (780.52s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachmentAccepter_basic_sameAccount (773.52s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachmentAccepter_Tags_sameAccount (815.32s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_Filter_differentAccount (389.30s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_Filter_sameAccount (397.06s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_ID_differentAccount (333.33s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_ID_sameAccount (333.84s)
--- PASS: TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_Tags (332.99s)
--- PASS: TestAccAWSProvider_AssumeRole_Empty (16.67s)
--- PASS: TestAccAWSProvider_Endpoints (14.28s)
--- PASS: TestAccAWSProvider_IgnoreTags_EmptyConfigurationBlock (14.21s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_Multiple (14.15s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_None (14.28s)
--- PASS: TestAccAWSProvider_IgnoreTags_KeyPrefixes_One (14.05s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_Multiple (14.11s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_None (14.19s)
--- PASS: TestAccAWSProvider_IgnoreTags_Keys_One (14.31s)
--- PASS: TestAccAWSProvider_Region_AwsChina (11.20s)
--- PASS: TestAccAWSProvider_Region_AwsCommercial (11.54s)
--- PASS: TestAccAWSProvider_Region_AwsGovCloudUs (11.22s)
```
Output from acceptance testing in AWS GovCloud (US):
```
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion (24.77s)
--- SKIP: TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn (1.52s)
--- SKIP: TestAccAWSCloudFrontDistribution_ViewerCertificate_AcmCertificateArn_ConflictsWithCloudFrontDefaultCertificate (1.55s)
```
0 commit comments