mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
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 <f@lex.la>
This commit is contained in:
1 file changed
+9
@@ -1368,3 +1368,12 @@ func TestMinioObjectRemover_ReturnsTheServersError(t *testing.T) {
|
||||
t.Fatal("RemoveObject = nil, want the AccessDenied error")
|
||||
}
|
||||
}
|
||||
|
||||
func (f *fakeS3Bucket) StatObject(_ context.Context, _, key string) (int64, error) {
|
||||
for _, o := range f.objects {
|
||||
if o.Key == key {
|
||||
return o.Size, nil
|
||||
}
|
||||
}
|
||||
return 0, errors.New("not found")
|
||||
}
|
||||
Reference in new issue
Block a user