diff --git a/jib-cli/src/test/java/com/google/cloud/tools/jib/cli/BuildTest.java b/jib-cli/src/test/java/com/google/cloud/tools/jib/cli/BuildTest.java index 815d4f4877..5eba093f58 100644 --- a/jib-cli/src/test/java/com/google/cloud/tools/jib/cli/BuildTest.java +++ b/jib-cli/src/test/java/com/google/cloud/tools/jib/cli/BuildTest.java @@ -406,7 +406,7 @@ public void testParse_incompatibleCredentialOptions(String[] authArgs) { new Build(), ArrayUtils.add(authArgs, "--target=ignored"))); assertThat(meae) .hasMessageThat() - .containsMatch("^Error: (--(from-|to-)?credential-helper|\\[--username)"); + .containsMatch("^Error: (\\[)*(--(from-|to-)?credential-helper|\\[--(username|password))"); } @Test diff --git a/jib-cli/src/test/java/com/google/cloud/tools/jib/cli/WarTest.java b/jib-cli/src/test/java/com/google/cloud/tools/jib/cli/WarTest.java index 9c87ac6778..9bdc950c02 100644 --- a/jib-cli/src/test/java/com/google/cloud/tools/jib/cli/WarTest.java +++ b/jib-cli/src/test/java/com/google/cloud/tools/jib/cli/WarTest.java @@ -432,7 +432,7 @@ public void testParse_incompatibleCredentialOptions(String[] authArgs) { new War(), ArrayUtils.addAll(authArgs, "--target=ignored", "my-app.war"))); assertThat(meae) .hasMessageThat() - .containsMatch("^Error: (--(from-|to-)?credential-helper|\\[--username)"); + .containsMatch("^Error: (\\[)*(--(from-|to-)?credential-helper|\\[--(username|password))"); } @Test