From 63bdda0645d5055b4da3f1fa56d1936874dd179b Mon Sep 17 00:00:00 2001 From: Nathan LeClaire Date: Wed, 7 Jan 2015 10:56:26 -0800 Subject: [PATCH] Use temp dir instead of default dir Signed-off-by: Nathan LeClaire --- commands_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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{