Skip to content

Commit 6038e21

Browse files
committed
Fix KerberosAuthenticationIT tests
1 parent 61bc66b commit 6038e21

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x-pack/qa/kerberos-tests/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void setupRoleMapping() throws IOException {
142142

143143
public void testLoginByKeytab() throws IOException, PrivilegedActionException {
144144
final String keytabPath = krb5Fixture.getKeytab().toString();
145-
final boolean enabledDebugLogs = Booleans.parseBoolean(ENABLE_KERBEROS_DEBUG_LOGS_KEY);
145+
final boolean enabledDebugLogs = Booleans.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY), false);
146146
final SpnegoHttpClientConfigCallbackHandler callbackHandler = new SpnegoHttpClientConfigCallbackHandler(
147147
krb5Fixture.getPrincipal(),
148148
keytabPath,
@@ -154,7 +154,7 @@ public void testLoginByKeytab() throws IOException, PrivilegedActionException {
154154
public void testLoginByUsernamePassword() throws IOException, PrivilegedActionException {
155155
final String userPrincipalName = TEST_USER_WITH_PWD_KEY;
156156
final String password = TEST_USER_WITH_PWD_PASSWD_KEY;
157-
final boolean enabledDebugLogs = Booleans.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));
157+
final boolean enabledDebugLogs = Booleans.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY), false);
158158
final SpnegoHttpClientConfigCallbackHandler callbackHandler = new SpnegoHttpClientConfigCallbackHandler(
159159
userPrincipalName,
160160
new SecureString(password.toCharArray()),
@@ -166,7 +166,7 @@ public void testLoginByUsernamePassword() throws IOException, PrivilegedActionEx
166166
public void testGetOauth2TokenInExchangeForKerberosTickets() throws PrivilegedActionException, GSSException, IOException {
167167
final String userPrincipalName = TEST_USER_WITH_PWD_KEY;
168168
final String password = TEST_USER_WITH_PWD_PASSWD_KEY;
169-
final boolean enabledDebugLogs = Booleans.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));
169+
final boolean enabledDebugLogs = Booleans.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY), false);
170170
final SpnegoHttpClientConfigCallbackHandler callbackHandler = new SpnegoHttpClientConfigCallbackHandler(
171171
userPrincipalName,
172172
new SecureString(password.toCharArray()),

0 commit comments

Comments
 (0)