From eac199875e122b68b7b360d761b191a4a8ef1c54 Mon Sep 17 00:00:00 2001 From: James Hewitt Date: Tue, 17 Oct 2023 09:13:15 +0100 Subject: [PATCH] Remove test for nested file delete on S3 Nested files aren't supported on MinIO, and as our storage layout is filesystem based, we don't actually use nest files in the code. Remove the test so that we can support MinIO. Signed-off-by: James Hewitt --- registry/storage/driver/s3-aws/s3_test.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/registry/storage/driver/s3-aws/s3_test.go b/registry/storage/driver/s3-aws/s3_test.go index db55328b..ebd9d2a2 100644 --- a/registry/storage/driver/s3-aws/s3_test.go +++ b/registry/storage/driver/s3-aws/s3_test.go @@ -310,7 +310,6 @@ func TestDelete(t *testing.T) { objs := []string{ "/file1", "/file1-2", - "/file1/2", "/folder1/file1", "/folder2/file1", "/folder3/file1", @@ -322,15 +321,6 @@ func TestDelete(t *testing.T) { } tcs := []testCase{ - { - // special case where a given path is a file and has subpaths - name: "delete file1", - delete: "/file1", - expected: []string{ - "/file1", - "/file1/2", - }, - }, { name: "delete folder1", delete: "/folder1", @@ -374,16 +364,8 @@ func TestDelete(t *testing.T) { }, } - // objects to skip auto-created test case - skipCase := map[string]bool{ - // special case where deleting "/file1" also deletes "/file1/2" is tested explicitly - "/file1": true, - } // create a test case for each file for _, p := range objs { - if skipCase[p] { - continue - } tcs = append(tcs, testCase{ name: fmt.Sprintf("delete path:'%s'", p), delete: p,