Skip to content

Commit

Permalink
add partition checks to service principal data source tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hskiba committed Sep 20, 2024
1 parent 54a4a42 commit ee34887
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/service/meta/region_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/names"
)

func TestAccMetaRegionDataSource_FindRegionByEndpoint(t *testing.T) {
func TestAccMetaRegionDataSource_FindRegionByEC2Endpoint(t *testing.T) {
t.Parallel()

ctx := acctest.Context(t)
Expand Down
7 changes: 5 additions & 2 deletions internal/service/meta/service_principal_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func TestAccMetaServicePrincipal_ByRegion(t *testing.T) {
t.Run(region, func(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(ctx, t) },
PreCheck: func() { acctest.PreCheck(ctx, t); acctest.PreCheckPartition(t, names.PartitionForRegion(region)) },
ErrorCheck: acctest.ErrorCheck(t, tfmeta.PseudoServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -135,7 +135,10 @@ func TestAccMetaServicePrincipal_UniqueForServiceInRegion(t *testing.T) {
t.Run(fmt.Sprintf("%s/%s", testCase.Region, testCase.Service), func(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(ctx, t) },
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckPartition(t, names.PartitionForRegion(testCase.Region))
},
ErrorCheck: acctest.ErrorCheck(t, tfmeta.PseudoServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Steps: []resource.TestStep{
Expand Down

0 comments on commit ee34887

Please sign in to comment.