Add a generic error type to capture non-typed errors
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
parent
7840a5bc8f
commit
e79324edd8
10 changed files with 44 additions and 29 deletions
|
@ -626,7 +626,7 @@ func (suite *DriverSuite) TestURLFor(c *check.C) {
|
|||
c.Assert(err, check.IsNil)
|
||||
|
||||
url, err := suite.StorageDriver.URLFor(suite.ctx, filename, nil)
|
||||
if _, ok := err.(*storagedriver.ErrUnsupportedMethod); ok {
|
||||
if _, ok := err.(storagedriver.ErrUnsupportedMethod); ok {
|
||||
return
|
||||
}
|
||||
c.Assert(err, check.IsNil)
|
||||
|
@ -640,7 +640,7 @@ func (suite *DriverSuite) TestURLFor(c *check.C) {
|
|||
c.Assert(read, check.DeepEquals, contents)
|
||||
|
||||
url, err = suite.StorageDriver.URLFor(suite.ctx, filename, map[string]interface{}{"method": "HEAD"})
|
||||
if _, ok := err.(*storagedriver.ErrUnsupportedMethod); ok {
|
||||
if _, ok := err.(storagedriver.ErrUnsupportedMethod); ok {
|
||||
return
|
||||
}
|
||||
c.Assert(err, check.IsNil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue