Skip to content

Commit

Permalink
test(object): enable website configuration cassettes (#1596)
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsheep committed Nov 15, 2022
1 parent 53ac552 commit 7f97bfa
Show file tree
Hide file tree
Showing 4 changed files with 3,474 additions and 9 deletions.
16 changes: 7 additions & 9 deletions scaleway/resource_object_bucket_website_configuration_test.go
Expand Up @@ -18,13 +18,12 @@ const (
)

func TestAccObjectBucketWebsiteConfiguration_basic(t *testing.T) {
if !*UpdateCassettes {
t.Skip("Skipping ObjectStorage test as this kind of resource can't be deleted before 24h")
}
rName := sdkacctest.RandomWithPrefix(ResourcePrefix)
resourceName := resourceTestName

tt := NewTestTools(t)
defer tt.Cleanup()

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: ErrorCheck(t, EndpointsID),
Expand Down Expand Up @@ -67,13 +66,12 @@ func TestAccObjectBucketWebsiteConfiguration_basic(t *testing.T) {
}

func TestAccObjectBucketWebsiteConfiguration_WithPolicy(t *testing.T) {
if !*UpdateCassettes {
t.Skip("Skipping ObjectStorage test as this kind of resource can't be deleted before 24h")
}
rName := sdkacctest.RandomWithPrefix(ResourcePrefix)
resourceName := resourceTestName

tt := NewTestTools(t)
defer tt.Cleanup()

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: ErrorCheck(t, EndpointsID),
Expand Down Expand Up @@ -127,6 +125,7 @@ func TestAccObjectBucketWebsiteConfiguration_WithPolicy(t *testing.T) {
resource.TestCheckResourceAttrSet(resourceName, "website_domain"),
resource.TestCheckResourceAttrSet(resourceName, "website_endpoint"),
),
ExpectNonEmptyPlan: !*UpdateCassettes,
},
{
ResourceName: resourceName,
Expand All @@ -138,13 +137,12 @@ func TestAccObjectBucketWebsiteConfiguration_WithPolicy(t *testing.T) {
}

func TestAccObjectBucketWebsiteConfiguration_update(t *testing.T) {
if !*UpdateCassettes {
t.Skip("Skipping ObjectStorage test as this kind of resource can't be deleted before 24h")
}
rName := sdkacctest.RandomWithPrefix(ResourcePrefix)
resourceName := resourceTestName

tt := NewTestTools(t)
defer tt.Cleanup()

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: ErrorCheck(t, EndpointsID),
Expand Down

0 comments on commit 7f97bfa

Please sign in to comment.