registry/storage/driver: checking that non-existent path returns PathNotFoundError
Issue #1186 describes a condition where a null tags response is returned when using the s3 driver. The issue seems to be related to a missing PathNotFoundError in s3. This change adds a test for that to get an idea of the lack of compliance across storage drivers. If the failures are manageable, we'll add this test condition and fix the s3 driver. Signed-off-by: Stephen J Day <stephen.day@docker.com>master
							parent
							
								
									807a80ff06
								
							
						
					
					
						commit
						0322c3bf1f
					
				|  | @ -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…
	
		Reference in New Issue