From a3ffc1ca33fe742ab5d5e9c31078cc7b7a80dcfb Mon Sep 17 00:00:00 2001 From: William Martin Date: Fri, 5 Apr 2024 15:18:18 +0200 Subject: [PATCH] Use real Run Log Cache in run view tests --- pkg/cmd/run/view/view_test.go | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pkg/cmd/run/view/view_test.go b/pkg/cmd/run/view/view_test.go index 299595509..56911e6c9 100644 --- a/pkg/cmd/run/view/view_test.go +++ b/pkg/cmd/run/view/view_test.go @@ -1346,7 +1346,9 @@ func TestViewRun(t *testing.T) { browser := &browser.Stub{} tt.opts.Browser = browser - rlc := testRunLogCache{} + rlc := rlc{ + cacheDir: t.TempDir(), + } tt.opts.RunLogCache = rlc t.Run(tt.name, func(t *testing.T) { @@ -1493,18 +1495,6 @@ func Test_attachRunLog(t *testing.T) { } } -type testRunLogCache struct{} - -func (testRunLogCache) Exists(path string) (bool, error) { - return false, nil -} -func (testRunLogCache) Create(path string, content io.Reader) error { - return nil -} -func (testRunLogCache) Open(path string) (*zip.ReadCloser, error) { - return zip.OpenReader("./fixtures/run_log.zip") -} - var barfTheFobLogOutput = heredoc.Doc(` cool job barz the fob log line 1 cool job barz the fob log line 2