From e22c16ca84163636d674fb0935156f466169e1a3 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 13 Jul 2021 11:49:58 +0100 Subject: 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. --- internal/pipeline/pipeline_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'internal/pipeline/pipeline_test.go') 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 -- cgit v1.2.1-24-ge1ad