Skip to content

Commit

Permalink
Use the variable name from the constants
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed Jan 2, 2024
1 parent 91918a3 commit 163bf49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ void updateAdminPassword() {
// if ADMIN_PASSWORD is still an empty string, it implies no custom password was provided. We exit the setup.
if (Strings.isNullOrEmpty(ADMIN_PASSWORD)) {
System.out.println(
"No custom admin password found. Please provide a password via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD."
String.format(
"No custom admin password found. Please provide a password via the environment variable %s.",
ConfigConstants.OPENSEARCH_INITIAL_ADMIN_PASSWORD
)
);
System.exit(-1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ public void testUpdateAdminPassword_noPasswordSupplied() {
}

verifyStdOutContainsString(
"No custom admin password found. Please provide a password via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD."
String.format(
"No custom admin password found. Please provide a password via the environment variable %s.",
ConfigConstants.OPENSEARCH_INITIAL_ADMIN_PASSWORD
)
);
}

Expand Down

0 comments on commit 163bf49

Please sign in to comment.