Przeglądaj źródła

Merge pull request #40473 from thaJeztah/fix_TestLoginFailsWithBadCredentials

TestLoginFailsWithBadCredentials: prepare for Go 1.14 changes
Tibor Vass 5 lat temu
rodzic
commit
c6400be468
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      integration/system/login_test.go

+ 3 - 2
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/"))
 }