diff --git a/commands_test.go b/commands_test.go index 8c13260d28..39e508e47b 100644 --- a/commands_test.go +++ b/commands_test.go @@ -1,6 +1,7 @@ package main import ( + "io/ioutil" "os/exec" "testing" @@ -65,7 +66,10 @@ func (d *FakeDriver) GetSSHCommand(args ...string) (*exec.Cmd, error) { } func TestGetHostState(t *testing.T) { - storePath := "~/.docker" + storePath, err := ioutil.TempDir("", ".docker") + if err != nil { + t.Fatal("Error creating tmp dir:", err) + } hostListItems := make(chan hostListItem) store := NewStore(storePath) hosts := []Host{