Fix TestJobCaching. Swap WriteFile and second Client.Build
This commit is contained in:
parent
f00962e44d
commit
7cca06a1a3
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue