From 59d1986660c400ad396fd2eedc1426fad04b3d14 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 11 May 2017 22:48:46 +0200 Subject: [PATCH] s3: Use random prefix for tests --- src/restic/backend/s3/s3_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/restic/backend/s3/s3_test.go b/src/restic/backend/s3/s3_test.go index b806b3885..66511307e 100644 --- a/src/restic/backend/s3/s3_test.go +++ b/src/restic/backend/s3/s3_test.go @@ -5,6 +5,7 @@ import ( "crypto/rand" "encoding/hex" "errors" + "fmt" "io" "net" "os" @@ -125,6 +126,7 @@ func TestBackendMinio(t *testing.T) { cfg.Config = s3.Config{ Endpoint: "localhost:9000", Bucket: "restictestbucket", + Prefix: fmt.Sprintf("test-%d", time.Now().UnixNano()), UseHTTP: true, KeyID: key, Secret: secret, @@ -204,6 +206,7 @@ func TestBackendS3(t *testing.T) { cfg := s3cfg.(s3.Config) cfg.KeyID = os.Getenv("RESTIC_TEST_S3_KEY") cfg.Secret = os.Getenv("RESTIC_TEST_S3_SECRET") + cfg.Prefix = fmt.Sprintf("test-%d", time.Now().UnixNano()) return cfg, nil },