From 6e8247cc0e9f6cfe684173dcb8821c3c5994e9cd Mon Sep 17 00:00:00 2001 From: Kaiyao Ke <47203510+kaiyaok2@users.noreply.github.com> Date: Wed, 13 Sep 2023 13:47:47 -0500 Subject: [PATCH] address order permutation in MutuallyExclusiveArgsException (#4103) --- .../src/test/java/com/google/cloud/tools/jib/cli/BuildTest.java | 2 +- .../src/test/java/com/google/cloud/tools/jib/cli/WarTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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