Rename ~/.docker/hosts to ~/.docker/machines

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
Ben Firshman 2014-12-11 13:16:46 -08:00
parent da95ea3968
commit 4049f7ed22
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ type Store struct {
}
func NewStore() *Store {
rootPath := filepath.Join(drivers.GetHomeDir(), ".docker", "hosts")
rootPath := filepath.Join(drivers.GetHomeDir(), ".docker", "machines")
return &Store{Path: rootPath}
}

View File

@ -27,7 +27,7 @@ func (d DriverOptionsMock) Bool(key string) bool {
}
func clearHosts() error {
return os.RemoveAll(path.Join(drivers.GetHomeDir(), ".docker", "hosts"))
return os.RemoveAll(path.Join(drivers.GetHomeDir(), ".docker", "machines"))
}
func TestStoreCreate(t *testing.T) {
@ -50,7 +50,7 @@ func TestStoreCreate(t *testing.T) {
if host.Name != "test" {
t.Fatal("Host name is incorrect")
}
path := filepath.Join(drivers.GetHomeDir(), ".docker", "hosts", "test")
path := filepath.Join(drivers.GetHomeDir(), ".docker", "machines", "test")
if _, err := os.Stat(path); os.IsNotExist(err) {
t.Fatalf("Host path doesn't exist: %s", path)
}
@ -72,7 +72,7 @@ func TestStoreRemove(t *testing.T) {
if err != nil {
t.Fatal(err)
}
path := filepath.Join(drivers.GetHomeDir(), ".docker", "hosts", "test")
path := filepath.Join(drivers.GetHomeDir(), ".docker", "machines", "test")
if _, err := os.Stat(path); os.IsNotExist(err) {
t.Fatalf("Host path doesn't exist: %s", path)
}