Uses random paths with slashes for storagedriver tests, adds edge cases
This replaces only using flat filenames, to better test nested file behaviors. Fixed inmemory/mfs.go and filesystem/driver.go after finding bugs with the new tests and test behavior.
This commit is contained in:
parent
9e38ca2231
commit
cacf33ab62
3 changed files with 186 additions and 59 deletions
|
@ -203,6 +203,10 @@ func (d *Driver) Move(sourcePath string, destPath string) error {
|
|||
return storagedriver.PathNotFoundError{Path: sourcePath}
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(path.Dir(dest), 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err := os.Rename(source, dest)
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue