From e625bc7160c0969156b2e8d31cfb7b1f747034df Mon Sep 17 00:00:00 2001 From: Collin Shoop Date: Wed, 11 Aug 2021 16:18:14 -0400 Subject: [PATCH] storagedriver/s3: Removed temporary S3 test (cherry picked from commit ce80e98cea1d15aa2a2ab931c8b9a1161fc6e218) Signed-off-by: Collin Shoop --- registry/storage/driver/s3-aws/s3_test.go | 47 ----------------------- 1 file changed, 47 deletions(-) diff --git a/registry/storage/driver/s3-aws/s3_test.go b/registry/storage/driver/s3-aws/s3_test.go index dc5510e2a..7e987a2f3 100644 --- a/registry/storage/driver/s3-aws/s3_test.go +++ b/registry/storage/driver/s3-aws/s3_test.go @@ -272,53 +272,6 @@ func TestStorageClass(t *testing.T) { } -func TestPopulate(t *testing.T) { - - if skipS3() != "" { - t.Skip(skipS3()) - } - - rootDir, err := ioutil.TempDir("", "driver-") - if err != nil { - t.Fatalf("unexpected error creating temporary directory: %v", err) - } - defer os.Remove(rootDir) - - driver, err := s3DriverConstructor(rootDir, s3.StorageClassStandard) - if err != nil { - t.Fatalf("unexpected error creating driver with standard storage: %v", err) - } - - var objs = []string{ - "/file1", - "/file1-2", - "/file1/2", - "/folder1/file1", - "/folder2/file1", - "/folder3/file1", - "/folder3/subfolder1/subfolder1/file1", - "/folder3/subfolder2/subfolder1/file1", - "/folder4/file1", - "/folder1-v2/file1", - "/folder1-v2/subfolder1/file1", - } - - init := func() []string { - // init file structure matching objs above - var created []string - for _, path := range objs { - err := driver.PutContent(context.Background(), path, []byte("content "+path)) - if err != nil { - fmt.Printf("unable to init file %s: %s\n", path, err) - continue - } - created = append(created, path) - } - return created - } - init() -} - func TestDelete(t *testing.T) { if skipS3() != "" { t.Skip(skipS3())