Skip to content

Commit

Permalink
Add 'TestAccS3Object_upgradeFromV4'.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Aug 22, 2023
1 parent e56de8f commit d7ff52d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions internal/service/s3/object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,38 @@ func TestAccS3Object_empty(t *testing.T) {
})
}

func TestAccS3Object_upgradeFromV4(t *testing.T) {
ctx := acctest.Context(t)
var obj s3.GetObjectOutput
resourceName := "aws_s3_object.object"
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(ctx, t) },
ErrorCheck: acctest.ErrorCheck(t, s3.EndpointsID),
CheckDestroy: testAccCheckObjectDestroy(ctx),
Steps: []resource.TestStep{
{
ExternalProviders: map[string]resource.ExternalProvider{
"aws": {
Source: "hashicorp/aws",
VersionConstraint: "4.67.0",
},
},
Config: testAccObjectConfig_empty(rName),
Check: resource.ComposeTestCheckFunc(
testAccCheckObjectExists(ctx, resourceName, &obj),
),
},
{
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Config: testAccObjectConfig_empty(rName),
PlanOnly: true,
},
},
})
}

func TestAccS3Object_source(t *testing.T) {
ctx := acctest.Context(t)
var obj s3.GetObjectOutput
Expand Down

0 comments on commit d7ff52d

Please sign in to comment.