From 8f353ee9e7a0def209a1b2de72884a874ef15e22 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Tue, 20 Feb 2024 10:57:09 +0100 Subject: [PATCH] stores: fix TestSlabCleanupTrigger --- stores/metadata_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stores/metadata_test.go b/stores/metadata_test.go index 4a61023994..d5a0f95318 100644 --- a/stores/metadata_test.go +++ b/stores/metadata_test.go @@ -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) } @@ -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) } @@ -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 {