diff --git a/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/commands/SetPasswordCmd.java b/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/commands/SetPasswordCmd.java index f3ce6ea4d1..805a8301bb 100644 --- a/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/commands/SetPasswordCmd.java +++ b/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/commands/SetPasswordCmd.java @@ -138,7 +138,7 @@ public class SetPasswordCmd extends AbstractAuthOptionsCmd { public static String usage() { StringWriter sb = new StringWriter(); PrintWriter out = new PrintWriter(sb); - out.println("Usage: " + CMD + " set-password (--username USERNAME | --userid ID) [--password PASSWORD] [ARGUMENTS]"); + out.println("Usage: " + CMD + " set-password (--username USERNAME | --userid ID) [--new-password PASSWORD] [ARGUMENTS]"); out.println(); out.println("Command to reset user's password."); out.println(); @@ -167,7 +167,7 @@ public class SetPasswordCmd extends AbstractAuthOptionsCmd { out.println("Examples:"); out.println(); out.println("Set new temporary password for the user:"); - out.println(" " + PROMPT + " " + CMD + " set-password -r demorealm --username testuser --password NEWPASS -t"); + out.println(" " + PROMPT + " " + CMD + " set-password -r demorealm --username testuser --new-password NEWPASS -t"); out.println(); out.println(); out.println("Use '" + CMD + " help' for general information and a list of commands"); diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/admin/KcAdmTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/admin/KcAdmTest.java index fe2caa4b58..3b427f0bde 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/admin/KcAdmTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/admin/KcAdmTest.java @@ -123,7 +123,7 @@ public class KcAdmTest extends AbstractAdmCliTest { exe = KcAdmExec.execute("set-password"); assertExitCodeAndStdErrSize(exe, 1, 0); Assert.assertTrue("help message returned", exe.stdoutLines().size() > 10); - Assert.assertEquals("help message", "Usage: " + CMD + " set-password (--username USERNAME | --userid ID) [--password PASSWORD] [ARGUMENTS]", exe.stdoutLines().get(0)); + Assert.assertEquals("help message", "Usage: " + CMD + " set-password (--username USERNAME | --userid ID) [--new-password PASSWORD] [ARGUMENTS]", exe.stdoutLines().get(0)); //Assert.assertEquals("error message", "CLIENT not specified", exe.stderrLines().get(0)); exe = KcAdmExec.execute("help"); @@ -174,7 +174,7 @@ public class KcAdmTest extends AbstractAdmCliTest { exe = KcAdmExec.execute("set-password --help"); assertExitCodeAndStdErrSize(exe, 0, 0); - Assert.assertEquals("stdout first line", "Usage: " + CMD + " set-password (--username USERNAME | --userid ID) [--password PASSWORD] [ARGUMENTS]", exe.stdoutLines().get(0)); + Assert.assertEquals("stdout first line", "Usage: " + CMD + " set-password (--username USERNAME | --userid ID) [--new-password PASSWORD] [ARGUMENTS]", exe.stdoutLines().get(0)); exe = KcAdmExec.execute("config --help"); assertExitCodeAndStdErrSize(exe, 0, 0);