Skip to content

Commit

Permalink
Check if bucket exists before creating it
Browse files Browse the repository at this point in the history
  • Loading branch information
pgporada committed Sep 6, 2023
1 parent dfc48eb commit 2ca5da5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,14 @@ func TestIntegration(t *testing.T) {
}
s3Service := s3.NewFromConfig(cfg)

_, err = s3Service.CreateBucket(context.Background(), &s3.CreateBucketInput{
Bucket: aws.String("bucket"),
})
_, err = s3Service.HeadBucket(context.TODO(), &s3.HeadBucketInput{Bucket: aws.String("bucket")})
if err != nil {
t.Fatal(err)
_, err = s3Service.CreateBucket(context.Background(), &s3.CreateBucketInput{
Bucket: aws.String("bucket"),
})
if err != nil {
t.Fatal(err)
}
}

ctile := tileCachingHandler{
Expand Down

0 comments on commit 2ca5da5

Please sign in to comment.