diff --git a/integration/system/login_test.go b/integration/system/login_test.go index 819b7ee7f9..e6506c0811 100644 --- a/integration/system/login_test.go +++ b/integration/system/login_test.go @@ -23,6 +23,7 @@ func TestLoginFailsWithBadCredentials(t *testing.T) { Password: "no-password", } _, err := client.RegistryLogin(context.Background(), config) - expected := "Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password" - assert.Check(t, is.Error(err, expected)) + assert.Assert(t, err != nil) + assert.Check(t, is.ErrorContains(err, "unauthorized: incorrect username or password")) + assert.Check(t, is.ErrorContains(err, "https://registry-1.docker.io/v2/")) }