Skip to content

Commit f83f630

Browse files
authored
Remove unneeded destructive integration tests for Amazon S3 Control API (#1637)
Removes unneeded destructive integration tests for s3control's PublicAccessBlockConfiguration. Simplifies integration test to non-destructive API call.
1 parent ccdd0e4 commit f83f630

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

service/internal/integrationtest/s3control/api_test.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,10 @@ func TestInteg_PublicAccessBlock(t *testing.T) {
1919
AccountId: aws.String(accountID),
2020
})
2121
if err != nil {
22+
// Ignore NoSuchPublicAccessBlockConfiguration, but fail on any other error.
2223
var e *types.NoSuchPublicAccessBlockConfiguration
2324
if !errors.As(err, &e) {
2425
t.Fatalf("expect no error for GetPublicAccessBlock, got %v", err)
2526
}
2627
}
27-
28-
_, err = svc.PutPublicAccessBlock(ctx, &s3control.PutPublicAccessBlockInput{
29-
AccountId: aws.String(accountID),
30-
PublicAccessBlockConfiguration: &types.PublicAccessBlockConfiguration{
31-
IgnorePublicAcls: true,
32-
},
33-
})
34-
if err != nil {
35-
t.Fatalf("expect no error, got %v", err)
36-
}
37-
38-
_, err = svc.DeletePublicAccessBlock(ctx, &s3control.DeletePublicAccessBlockInput{
39-
AccountId: aws.String(accountID),
40-
})
41-
if err != nil {
42-
t.Fatalf("expect no error, got %v", err)
43-
}
4428
}

0 commit comments

Comments
 (0)