Merge pull request #1187 from stevvooe/check-storage-drivers-list-path-not-found
[WIP] registry/storage/driver: checking that non-existent path returns PathNotFoundError
This commit is contained in:
commit
e6363e8a20
7 changed files with 37 additions and 15 deletions
|
@ -472,6 +472,13 @@ func (suite *DriverSuite) TestList(c *check.C) {
|
|||
rootDirectory := "/" + randomFilename(int64(8+rand.Intn(8)))
|
||||
defer suite.StorageDriver.Delete(suite.ctx, rootDirectory)
|
||||
|
||||
doesnotexist := path.Join(rootDirectory, "nonexistent")
|
||||
_, err := suite.StorageDriver.List(suite.ctx, doesnotexist)
|
||||
c.Assert(err, check.Equals, storagedriver.PathNotFoundError{
|
||||
Path: doesnotexist,
|
||||
DriverName: suite.StorageDriver.Name(),
|
||||
})
|
||||
|
||||
parentDirectory := rootDirectory + "/" + randomFilename(int64(8+rand.Intn(8)))
|
||||
childFiles := make([]string, 50)
|
||||
for i := 0; i < len(childFiles); i++ {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue