diff --git a/disttest/single_worker_test.go b/disttest/single_worker_test.go index 0906060..85109b2 100644 --- a/disttest/single_worker_test.go +++ b/disttest/single_worker_test.go @@ -62,11 +62,11 @@ func TestJobCaching(t *testing.T) { assert.Len(t, recorder.Jobs, 1) assert.Equal(t, &JobResult{Stdout: "OK\n", Code: new(int)}, recorder.Jobs[build.ID{'a'}]) + require.NoError(t, ioutil.WriteFile(tmpFile.Name(), []byte("NOTOK\n"), 0666)) + // Second build must get results from cache. require.NoError(t, env.Client.Build(env.Ctx, graph, NewRecorder())) - require.NoError(t, ioutil.WriteFile(tmpFile.Name(), []byte("NOTOK\n"), 0666)) - output, err := ioutil.ReadAll(tmpFile) require.NoError(t, err) require.Equal(t, []byte("NOTOK\n"), output)