Delete all versions (#1376)

* delete all versions

* style

Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
adfost
2022-01-20 17:28:52 -08:00
committed by GitHub
parent d9531f9617
commit 3ba7b34b25
12 changed files with 211 additions and 16 deletions

View File

@@ -569,7 +569,8 @@ func Test_listObjects(t *testing.T) {
func Test_deleteObjects(t *testing.T) {
ctx := context.Background()
client := s3ClientMock{}
s3Client1 := s3ClientMock{}
minioClient1 := minioClientMock{}
type args struct {
bucket string
path string
@@ -723,7 +724,7 @@ func Test_deleteObjects(t *testing.T) {
t.Run(tt.test, func(t *testing.T) {
mcListMock = tt.args.listFunc
mcRemoveMock = tt.args.removeFunc
err := deleteObjects(ctx, client, tt.args.bucket, tt.args.path, tt.args.versionID, tt.args.recursive)
err := deleteObjects(ctx, s3Client1, minioClient1, tt.args.bucket, tt.args.path, tt.args.versionID, tt.args.recursive, false)
if !reflect.DeepEqual(err, tt.wantError) {
t.Errorf("deleteObjects() error: %v, wantErr: %v", err, tt.wantError)
return