Use real Run Log Cache in run view tests
This commit is contained in:
parent
e644dc50d6
commit
a3ffc1ca33
1 changed files with 3 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue