Skip to content

Commit 3d6f4ec

Browse files
ywangdtvernum
andauthored
Fix ShowKeyStoreCommand test on FIPS (#78243) (#78747)
When running under FIPS a keystore must have a password Co-authored-by: Tim Vernum <[email protected]>
1 parent cc6d8d4 commit 3d6f4ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

distribution/tools/keystore-cli/src/test/java/org/elasticsearch/common/settings/ShowKeyStoreCommandTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public void testErrorOnMissingKeystore() throws Exception {
3838
}
3939

4040
public void testErrorOnMissingParameter() throws Exception {
41-
createKeystore("");
41+
final String password = getPossibleKeystorePassword();
42+
createKeystore(password);
43+
terminal.addSecretInput(password);
4244
final UserException e = expectThrows(UserException.class, this::execute);
4345
assertEquals(ExitCodes.USAGE, e.exitCode);
4446
assertThat(e.getMessage(), containsString("Must provide a single setting name to show"));

0 commit comments

Comments
 (0)