mirror of https://github.com/docker/docs.git
Rename ~/.docker/hosts to ~/.docker/machines
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
parent
da95ea3968
commit
4049f7ed22
2
store.go
2
store.go
|
@ -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}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue