Skip to content

Commit cab3954

Browse files
committed
aws_organizations_organization: Add test cases for newly added policies
1 parent 7a9f8e4 commit cab3954

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

internal/service/organizations/organization_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,24 @@ func testAccOrganization_EnabledPolicyTypes(t *testing.T) {
256256
resource.TestCheckResourceAttr(resourceName, "enabled_policy_types.0", string(awstypes.PolicyTypeUpgradeRolloutPolicy)),
257257
),
258258
},
259+
{
260+
Config: testAccOrganizationConfig_enabledPolicyTypes1(string(awstypes.PolicyTypeS3Policy)),
261+
Check: resource.ComposeTestCheckFunc(
262+
testAccCheckOrganizationExists(ctx, resourceName, &organization),
263+
resource.TestCheckResourceAttr(resourceName, "aws_service_access_principals.#", "0"),
264+
resource.TestCheckResourceAttr(resourceName, "enabled_policy_types.#", "1"),
265+
resource.TestCheckResourceAttr(resourceName, "enabled_policy_types.0", string(awstypes.PolicyTypeS3Policy)),
266+
),
267+
},
268+
{
269+
Config: testAccOrganizationConfig_enabledPolicyTypes1(string(awstypes.PolicyTypeBedrockPolicy)),
270+
Check: resource.ComposeTestCheckFunc(
271+
testAccCheckOrganizationExists(ctx, resourceName, &organization),
272+
resource.TestCheckResourceAttr(resourceName, "aws_service_access_principals.#", "0"),
273+
resource.TestCheckResourceAttr(resourceName, "enabled_policy_types.#", "1"),
274+
resource.TestCheckResourceAttr(resourceName, "enabled_policy_types.0", string(awstypes.PolicyTypeBedrockPolicy)),
275+
),
276+
},
259277
{
260278
ResourceName: resourceName,
261279
ImportState: true,

0 commit comments

Comments
 (0)