Skip to content

Commit

Permalink
Tidy up 'testAccOrganizationalUnitDataSource_basic'.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Sep 19, 2023
1 parent f35b873 commit c53da9d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"testing"

"github.com/YakDriver/regexache"
"github.com/aws/aws-sdk-go/service/organizations"
sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
Expand All @@ -16,6 +15,7 @@ import (

func testAccOrganizationalUnitDataSource_basic(t *testing.T) {
ctx := acctest.Context(t)
resourceName := "aws_organizations_organizational_unit.child"
dataSourceName := "data.aws_organizations_organizational_unit.test"
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

Expand All @@ -29,8 +29,8 @@ func testAccOrganizationalUnitDataSource_basic(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccOrganizationalUnitDataSourceConfig_basic(rName),
Check: resource.ComposeTestCheckFunc(
acctest.MatchResourceAttrGlobalARN(dataSourceName, "arn", "organizations", regexache.MustCompile(".*/.+$")),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttrPair(dataSourceName, "arn", resourceName, "arn"),
),
},
},
Expand Down

0 comments on commit c53da9d

Please sign in to comment.