summaryrefslogtreecommitdiff
path: root/internal/pipeline/pipeline_test.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-07-13 11:49:58 +0100
committerNick White <git@njw.name>2021-07-13 11:49:58 +0100
commite22c16ca84163636d674fb0935156f466169e1a3 (patch)
tree6d29d1ebea4a89dad706df79d40c6a37df2d4b01 /internal/pipeline/pipeline_test.go
parent05fbc6c65c8556d89d8b7fdb645f3ef3b273b5e9 (diff)
internal/pipeline: Reorganise interfaces so that functions only declare what they need
We were using Pipeliner as a catch-all, but it's nicer if the functions can just state that e.g. they need download functionality, so decompose things so that that's how we do things now.
Diffstat (limited to 'internal/pipeline/pipeline_test.go')
-rw-r--r--internal/pipeline/pipeline_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/pipeline/pipeline_test.go b/internal/pipeline/pipeline_test.go
index dfcb8a3..806f9be 100644
--- a/internal/pipeline/pipeline_test.go
+++ b/internal/pipeline/pipeline_test.go
@@ -28,9 +28,15 @@ func (t *StrLog) Write(p []byte) (n int, err error) {
return len(p), nil
}
+type PipelineTester interface {
+ Pipeliner
+ DeleteObjects(bucket string, keys []string) error
+ TestQueueId() string
+}
+
type connection struct {
name string
- c Pipeliner
+ c PipelineTester
}
// Test_download tests the download() function inside the pipeline