Skip to content

Commit

Permalink
Remove unneeded destructive integration tests for Amazon S3 Control A…
Browse files Browse the repository at this point in the history
…PI (#1637)

Removes unneeded destructive integration tests for s3control's PublicAccessBlockConfiguration. Simplifies integration test to non-destructive API call.
  • Loading branch information
jasdel committed Mar 23, 2022
1 parent ccdd0e4 commit f83f630
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions service/internal/integrationtest/s3control/api_test.go
Expand Up @@ -19,26 +19,10 @@ func TestInteg_PublicAccessBlock(t *testing.T) {
AccountId: aws.String(accountID),
})
if err != nil {
// Ignore NoSuchPublicAccessBlockConfiguration, but fail on any other error.
var e *types.NoSuchPublicAccessBlockConfiguration
if !errors.As(err, &e) {
t.Fatalf("expect no error for GetPublicAccessBlock, got %v", err)
}
}

_, err = svc.PutPublicAccessBlock(ctx, &s3control.PutPublicAccessBlockInput{
AccountId: aws.String(accountID),
PublicAccessBlockConfiguration: &types.PublicAccessBlockConfiguration{
IgnorePublicAcls: true,
},
})
if err != nil {
t.Fatalf("expect no error, got %v", err)
}

_, err = svc.DeletePublicAccessBlock(ctx, &s3control.DeletePublicAccessBlockInput{
AccountId: aws.String(accountID),
})
if err != nil {
t.Fatalf("expect no error, got %v", err)
}
}

0 comments on commit f83f630

Please sign in to comment.