Skip to content

Commit

Permalink
stores: fix TestSlabCleanupTrigger
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Feb 20, 2024
1 parent 671f8da commit 8f353ee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions stores/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3941,7 +3941,8 @@ func TestSlabCleanupTrigger(t *testing.T) {
}

// delete the object
if err := ss.db.Delete(&obj1).Error; err != nil {
err := ss.RemoveObject(context.Background(), api.DefaultBucketName, obj1.ObjectID)
if err != nil {
t.Fatal(err)
}

Expand All @@ -3954,7 +3955,8 @@ func TestSlabCleanupTrigger(t *testing.T) {
}

// delete second object
if err := ss.db.Delete(&obj2).Error; err != nil {
err = ss.RemoveObject(context.Background(), api.DefaultBucketName, obj2.ObjectID)
if err != nil {
t.Fatal(err)
}

Expand Down Expand Up @@ -3998,7 +4000,8 @@ func TestSlabCleanupTrigger(t *testing.T) {
}

// delete third object
if err := ss.db.Delete(&obj3).Error; err != nil {
err = ss.RemoveObject(context.Background(), api.DefaultBucketName, obj3.ObjectID)
if err != nil {
t.Fatal(err)
}
if err := ss.db.Model(&dbSlab{}).Count(&slabCntr).Error; err != nil {
Expand Down

0 comments on commit 8f353ee

Please sign in to comment.