Skip to content

Commit

Permalink
Merge pull request #15554 from terraform-providers/b-prevent-importin…
Browse files Browse the repository at this point in the history
…g-organization-policy-2

Enables Organizations policy import AWS-managed acceptance test
  • Loading branch information
gdavison authored Oct 14, 2020
2 parents b1e4cc5 + 22f8863 commit 3631e7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aws/resource_aws_organizations_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ func testAccAwsOrganizationsPolicy_ImportAwsManagedPolicy(t *testing.T) {

resourceID := "p-FullAWSAccess"

t.Skip("This test requires SDK 2.0.4 or higher for `ExpectError` with `ImportState`")
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) },
Providers: testAccProviders,
Expand All @@ -392,7 +391,7 @@ func testAccAwsOrganizationsPolicy_ImportAwsManagedPolicy(t *testing.T) {
ResourceName: resourceName,
ImportStateId: resourceID,
ImportState: true,
ExpectError: regexp.MustCompile(fmt.Sprintf("AWS-managed Organizations policy (%s) cannot be imported.", resourceID)),
ExpectError: regexp.MustCompile(regexp.QuoteMeta(fmt.Sprintf("AWS-managed Organizations policy (%s) cannot be imported.", resourceID))),
},
},
})
Expand Down

0 comments on commit 3631e7f

Please sign in to comment.