Skip to content

Commit

Permalink
fix CreateR2BucketParameters usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Aug 22, 2022
1 parent 9de6304 commit 23bde0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions r2_bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ func TestR2_CreateBucket(t *testing.T) {
assert.Equal(t, ErrMissingAccountID, err)
}

err = client.CreateR2Bucket(context.Background(), AccountIdentifier(testAccountID), CreateR2BucketParameters{})
err = client.CreateR2Bucket(context.Background(), AccountIdentifier(testAccountID), CreateR2BucketParameters{Name: ""})
if assert.Error(t, err) {
assert.Equal(t, ErrMissingBucketName, err)
}

err = client.CreateR2Bucket(context.Background(), AccountIdentifier(testAccountID), CreateR2BucketParameters{testBucketName})
err = client.CreateR2Bucket(context.Background(), AccountIdentifier(testAccountID), CreateR2BucketParameters{Name: testBucketName})
assert.NoError(t, err)
}

Expand Down

0 comments on commit 23bde0b

Please sign in to comment.