Use temp dir instead of default dir

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
Nathan LeClaire 2015-01-07 10:56:26 -08:00
parent 80436e9b66
commit 63bdda0645
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package main package main
import ( import (
"io/ioutil"
"os/exec" "os/exec"
"testing" "testing"
@ -65,7 +66,10 @@ func (d *FakeDriver) GetSSHCommand(args ...string) (*exec.Cmd, error) {
} }
func TestGetHostState(t *testing.T) { 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) hostListItems := make(chan hostListItem)
store := NewStore(storePath) store := NewStore(storePath)
hosts := []Host{ hosts := []Host{