From 45b0c3ed61b1a7b7d18090f483c5d9ff9cddec7b Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 13 Jul 2021 11:54:00 +0100 Subject: gofmt --- internal/pipeline/pipeline_test.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'internal') diff --git a/internal/pipeline/pipeline_test.go b/internal/pipeline/pipeline_test.go index 806f9be..4a08d3b 100644 --- a/internal/pipeline/pipeline_test.go +++ b/internal/pipeline/pipeline_test.go @@ -36,7 +36,7 @@ type PipelineTester interface { type connection struct { name string - c PipelineTester + c PipelineTester } // Test_download tests the download() function inside the pipeline @@ -53,11 +53,11 @@ func Test_download(t *testing.T) { } cases := []struct { - dl string + dl string contents []byte - process string - errs []error - } { + process string + errs []error + }{ {"notpresent", []byte(""), "", []error{errors.New("no such file or directory"), errors.New("NoSuchKey: The specified key does not exist")}}, {"empty", []byte{}, "empty", []error{}}, {"justastring", []byte("I am just a basic string"), "justastring", []error{}}, @@ -73,7 +73,7 @@ func Test_download(t *testing.T) { slog.log = "" tempDir := filepath.Join(os.TempDir(), "pipelinetest") err = os.MkdirAll(tempDir, 0700) - if err != nil && ! os.IsExist(err) { + if err != nil && !os.IsExist(err) { t.Fatalf("Could not create temporary directory %s: %v\nLog: %s", tempDir, err, slog.log) } @@ -174,11 +174,11 @@ func Test_up(t *testing.T) { } cases := []struct { - ul string + ul string contents []byte - process string - errs []error - } { + process string + errs []error + }{ {"notpresent", []byte(""), "", []error{errors.New("no such file or directory"), errors.New("NoSuchKey: The specified key does not exist")}}, {"empty", []byte{}, "empty", []error{}}, {"justastring", []byte("I am just a basic string"), "justastring", []error{}}, @@ -194,7 +194,7 @@ func Test_up(t *testing.T) { slog.log = "" tempDir := filepath.Join(os.TempDir(), "pipelinetest") err = os.MkdirAll(tempDir, 0700) - if err != nil && ! os.IsExist(err) { + if err != nil && !os.IsExist(err) { t.Fatalf("Could not create temporary directory %s: %v\nLog: %s", tempDir, err, slog.log) } @@ -244,7 +244,7 @@ func Test_up(t *testing.T) { t.Fatalf("Uploaded file not removed as it should have been after uploading %s: %v\nLog: %s", tempFile, err, slog.log) } - err = conn.c.Download(conn.c.WIPStorageId(), "pipelinetest/" + c.ul, tempFile) + err = conn.c.Download(conn.c.WIPStorageId(), "pipelinetest/"+c.ul, tempFile) if err != nil { t.Fatalf("Could not download file %s: %v\nLog: %s", tempFile, err, slog.log) } @@ -292,11 +292,11 @@ func Test_upAndQueue(t *testing.T) { } cases := []struct { - ul string + ul string contents []byte - process string - errs []error - } { + process string + errs []error + }{ {"notpresent", []byte(""), "", []error{errors.New("no such file or directory"), errors.New("NoSuchKey: The specified key does not exist")}}, {"empty", []byte{}, "empty", []error{}}, {"justastring", []byte("I am just a basic string"), "justastring", []error{}}, @@ -312,7 +312,7 @@ func Test_upAndQueue(t *testing.T) { slog.log = "" tempDir := filepath.Join(os.TempDir(), "pipelinetest") err = os.MkdirAll(tempDir, 0700) - if err != nil && ! os.IsExist(err) { + if err != nil && !os.IsExist(err) { t.Fatalf("Could not create temporary directory %s: %v\nLog: %s", tempDir, err, slog.log) } @@ -376,7 +376,7 @@ func Test_upAndQueue(t *testing.T) { t.Fatalf("Uploaded file not removed as it should have been after uploading %s: %v\nLog: %s", tempFile, err, slog.log) } - err = conn.c.Download(conn.c.WIPStorageId(), "pipelinetest/" + c.ul, tempFile) + err = conn.c.Download(conn.c.WIPStorageId(), "pipelinetest/"+c.ul, tempFile) if err != nil { t.Fatalf("Could not download file %s: %v\nLog: %s", tempFile, err, slog.log) } -- cgit v1.2.1-24-ge1ad