Merge pull request #46362 from thaJeztah/errdefs_no_deps
errdefs: remove gotest.tools dependency and remove some redundant import comments
This commit is contained in:
commit
cc1627ae10
6 changed files with 8 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
package errdefs // import "github.com/docker/docker/errdefs"
|
||||
package errdefs
|
||||
|
||||
// ErrNotFound signals that the requested object doesn't exist
|
||||
type ErrNotFound interface {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package errdefs // import "github.com/docker/docker/errdefs"
|
||||
package errdefs
|
||||
|
||||
import "context"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package errdefs // import "github.com/docker/docker/errdefs"
|
||||
package errdefs
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package errdefs // import "github.com/docker/docker/errdefs"
|
||||
package errdefs
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
|
|
@ -4,8 +4,6 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"gotest.tools/v3/assert"
|
||||
)
|
||||
|
||||
func TestFromStatusCode(t *testing.T) {
|
||||
|
@ -86,7 +84,9 @@ func TestFromStatusCode(t *testing.T) {
|
|||
for _, tc := range testCases {
|
||||
t.Run(http.StatusText(tc.status), func(t *testing.T) {
|
||||
err := FromStatusCode(tc.err, tc.status)
|
||||
assert.Check(t, tc.check(err), "unexpected error-type %T", err)
|
||||
if !tc.check(err) {
|
||||
t.Errorf("unexpected error-type %T", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package errdefs // import "github.com/docker/docker/errdefs"
|
||||
package errdefs
|
||||
|
||||
type causer interface {
|
||||
Cause() error
|
||||
|
|
Loading…
Add table
Reference in a new issue