Skip to content

Commit 5d453c4

Browse files
committed
test(backups): give the fake S3 bucket a StatObject
main added StatObject to the object lister interface, so the fake bucket the MariaDB cleanup tests use has to implement it to compile. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent 8a37a70 commit 5d453c4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎internal/backupcontroller/mariadbstrategy_cleanup_test.go‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,3 +1368,12 @@ func TestMinioObjectRemover_ReturnsTheServersError(t *testing.T) {
13681368
t.Fatal("RemoveObject = nil, want the AccessDenied error")
13691369
}
13701370
}
1371+
1372+
func (f *fakeS3Bucket) StatObject(_ context.Context, _, key string) (int64, error) {
1373+
for _, o := range f.objects {
1374+
if o.Key == key {
1375+
return o.Size, nil
1376+
}
1377+
}
1378+
return 0, errors.New("not found")
1379+
}

0 commit comments

Comments
 (0)