Adds another error test case for reading nonexistent files

pull/4/head
Brian Bland 2014-12-10 10:51:07 -08:00
parent 12326f7090
commit bbf288a808
1 changed files with 5 additions and 0 deletions

View File

@ -396,9 +396,14 @@ func (suite *DriverSuite) TestContinueStreamAppend(c *check.C) {
// fails.
func (suite *DriverSuite) TestReadNonexistentStream(c *check.C) {
filename := randomPath(32)
_, err := suite.StorageDriver.ReadStream(filename, 0)
c.Assert(err, check.NotNil)
c.Assert(err, check.FitsTypeOf, storagedriver.PathNotFoundError{})
_, err = suite.StorageDriver.ReadStream(filename, 64)
c.Assert(err, check.NotNil)
c.Assert(err, check.FitsTypeOf, storagedriver.PathNotFoundError{})
}
// TestList checks the returned list of keys after populating a directory tree.