From 749376645a64bd37fc545e137c8a68d1c96bb463 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 31 May 2021 13:27:52 +0100 Subject: Fix bug after changing pipeliner for tests, to ensure DeleteObjects is available to Pipeliner --- cmd/bookpipeline/main.go | 1 + cmd/rescribe/main.go | 1 + internal/pipeline/pipeline_test.go | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/bookpipeline/main.go b/cmd/bookpipeline/main.go index 909b431..0df2209 100644 --- a/cmd/bookpipeline/main.go +++ b/cmd/bookpipeline/main.go @@ -56,6 +56,7 @@ func (w NullWriter) Write(p []byte) (n int, err error) { type Clouder interface { Init() error ListObjects(bucket string, prefix string) ([]string, error) + DeleteObjects(bucket string, keys []string) error Download(bucket string, key string, fn string) error Upload(bucket string, key string, path string) error CheckQueue(url string, timeout int64) (bookpipeline.Qmsg, error) diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go index a471b1f..606a9a7 100644 --- a/cmd/rescribe/main.go +++ b/cmd/rescribe/main.go @@ -49,6 +49,7 @@ func (w NullWriter) Write(p []byte) (n int, err error) { type Clouder interface { Init() error ListObjects(bucket string, prefix string) ([]string, error) + DeleteObjects(bucket string, keys []string) error Download(bucket string, key string, fn string) error Upload(bucket string, key string, path string) error CheckQueue(url string, timeout int64) (bookpipeline.Qmsg, error) diff --git a/internal/pipeline/pipeline_test.go b/internal/pipeline/pipeline_test.go index 68039e1..55b93e7 100644 --- a/internal/pipeline/pipeline_test.go +++ b/internal/pipeline/pipeline_test.go @@ -113,7 +113,7 @@ func Test_download(t *testing.T) { t.Fatalf("Received a different error than was expected, expected one of: %v, got %v\nLog: %s", c.errs, err, slog.log) } case process := <-processchan: - expected := tempDir + "/" + c.process + expected := tempDir + "/" + c.process if expected != process { t.Fatalf("Received a different addition to the process channel than was expected, expected: %v, got %v\nLog: %s", expected, process, slog.log) } -- cgit v1.2.1-24-ge1ad