Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
The test shouldn’t depend on Docker being available

Fixes #593

Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot committed May 25, 2018
1 parent 5371084 commit 90d990a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/skaffold/docker/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ func TestDockerContext(t *testing.T) {
tmpDir, cleanup := testutil.TempDir(t)
defer cleanup()

RetrieveImage = mockRetrieveImage
defer func() {
RetrieveImage = retrieveImage
}()

os.Mkdir(filepath.Join(tmpDir, "files"), 0750)
ioutil.WriteFile(filepath.Join(tmpDir, "files", "ignored.txt"), []byte(""), 0644)
ioutil.WriteFile(filepath.Join(tmpDir, "files", "included.txt"), []byte(""), 0644)
Expand Down

0 comments on commit 90d990a

Please sign in to comment.