Skip to content

Commit

Permalink
testing: fix TestListObjects
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Sep 11, 2024
1 parent f4b538e commit 75b29fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stores/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3708,8 +3708,11 @@ func TestListObjects(t *testing.T) {
t.Fatal(err)
} else if len(res.Objects) != 2 {
t.Fatal("expected 2 objects", len(res.Objects))
} else if res.Objects[0].Bucket != api.DefaultBucketName || res.Objects[1].Bucket != t.Name() {
} else if res.Objects[0].Bucket == "" || res.Objects[1].Bucket == "" {
t.Fatal("expected buckets to be set")
} else if (res.Objects[0].Bucket == api.DefaultBucketName && res.Objects[1].Bucket != t.Name()) ||
(res.Objects[0].Bucket == t.Name() && res.Objects[1].Bucket != api.DefaultBucketName) {
t.Fatal("unexpected bucket")
}

// assert the new bucket has one object
Expand Down

0 comments on commit 75b29fe

Please sign in to comment.