diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2019-10-13 00:31:53 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2019-10-13 17:00:40 +0200 |
commit | de10c7d0136dc054abdb40ca624211c04334bdc0 (patch) | |
tree | 698c61a6057c402706ad054da750c83fe97f8551 /client/network_inspect_test.go | |
parent | d1e837d2a8d5f82c750c70b2e360b9f103f0273f (diff) | |
download | docker-de10c7d0136dc054abdb40ca624211c04334bdc0.tar.gz |
client: reduce string-matching in tests
These checks were redundant, as we were not expecting
a specific string, just that a server-error or authentication
error was returned.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'client/network_inspect_test.go')
-rw-r--r-- | client/network_inspect_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/network_inspect_test.go b/client/network_inspect_test.go index 699bccba67..e4bdafcdc6 100644 --- a/client/network_inspect_test.go +++ b/client/network_inspect_test.go @@ -12,6 +12,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/network" + "github.com/docker/docker/errdefs" "github.com/pkg/errors" "gotest.tools/assert" is "gotest.tools/assert/cmp" @@ -23,7 +24,9 @@ func TestNetworkInspectError(t *testing.T) { } _, err := client.NetworkInspect(context.Background(), "nothing", types.NetworkInspectOptions{}) - assert.Check(t, is.Error(err, "Error response from daemon: Server error")) + if !errdefs.IsSystem(err) { + t.Fatalf("expected a Server Error, got %[1]T: %[1]v", err) + } } func TestNetworkInspectNotFoundError(t *testing.T) { |