Merge pull request #26029 from luxas/mkdir_all

kubelet: Use MkdirAll instead of Mkdir
This commit is contained in:
Alex Robinson
2016-05-27 11:40:01 -07:00
5 changed files with 10 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ import (
// OSInterface collects system level operations that need to be mocked out
// during tests.
type OSInterface interface {
Mkdir(path string, perm os.FileMode) error
MkdirAll(path string, perm os.FileMode) error
Symlink(oldname string, newname string) error
Stat(path string) (os.FileInfo, error)
Remove(path string) error
@@ -40,8 +40,8 @@ type OSInterface interface {
type RealOS struct{}
// MkDir will will call os.Mkdir to create a directory.
func (RealOS) Mkdir(path string, perm os.FileMode) error {
return os.Mkdir(path, perm)
func (RealOS) MkdirAll(path string, perm os.FileMode) error {
return os.MkdirAll(path, perm)
}
// Symlink will call os.Symlink to create a symbolic link.

View File

@@ -41,7 +41,7 @@ func NewFakeOS() *FakeOS {
}
// Mkdir is a fake call that just returns nil.
func (FakeOS) Mkdir(path string, perm os.FileMode) error {
func (FakeOS) MkdirAll(path string, perm os.FileMode) error {
return nil
}