mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Automated migration using
gty-migrate-from-testify --ignore-build-tags Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
@@ -19,8 +19,9 @@ import (
|
||||
"github.com/docker/docker/volume/store"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/docker/libnetwork"
|
||||
"github.com/gotestyourself/gotestyourself/assert"
|
||||
is "github.com/gotestyourself/gotestyourself/assert/cmp"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
//
|
||||
@@ -312,7 +313,7 @@ func TestValidateContainerIsolation(t *testing.T) {
|
||||
d := Daemon{}
|
||||
|
||||
_, err := d.verifyContainerSettings(runtime.GOOS, &containertypes.HostConfig{Isolation: containertypes.Isolation("invalid")}, nil, false)
|
||||
assert.EqualError(t, err, "invalid isolation 'invalid' on "+runtime.GOOS)
|
||||
assert.Check(t, is.Error(err, "invalid isolation 'invalid' on "+runtime.GOOS))
|
||||
}
|
||||
|
||||
func TestFindNetworkErrorType(t *testing.T) {
|
||||
@@ -320,6 +321,6 @@ func TestFindNetworkErrorType(t *testing.T) {
|
||||
_, err := d.FindNetwork("fakeNet")
|
||||
_, ok := errors.Cause(err).(libnetwork.ErrNoSuchNetwork)
|
||||
if !errdefs.IsNotFound(err) || !ok {
|
||||
assert.Fail(t, "The FindNetwork method MUST always return an error that implements the NotFound interface and is ErrNoSuchNetwork")
|
||||
t.Error("The FindNetwork method MUST always return an error that implements the NotFound interface and is ErrNoSuchNetwork")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user