Another fix for security tribe tests when ssl is disabled

Original commit: elastic/x-pack-elasticsearch@db2eca3522
This commit is contained in:
Ryan Ernst 2017-06-27 14:52:37 -07:00
parent e8472908c1
commit 84574c0367
1 changed files with 7 additions and 5 deletions

View File

@ -155,12 +155,14 @@ public class SecurityTribeIT extends NativeRealmIntegTestCase {
MockSecureSettings secureSettingsTemplate = MockSecureSettings secureSettingsTemplate =
(MockSecureSettings) Settings.builder().put(cluster2SettingsSource.nodeSettings(0)).getSecureSettings(); (MockSecureSettings) Settings.builder().put(cluster2SettingsSource.nodeSettings(0)).getSecureSettings();
MockSecureSettings secureSettings = new MockSecureSettings(); MockSecureSettings secureSettings = new MockSecureSettings();
if (secureSettingsTemplate != null) {
for (String settingName : secureSettingsTemplate.getSettingNames()) { for (String settingName : secureSettingsTemplate.getSettingNames()) {
String settingValue = secureSettingsTemplate.getString(settingName).toString(); String settingValue = secureSettingsTemplate.getString(settingName).toString();
secureSettings.setString(settingName, settingValue); secureSettings.setString(settingName, settingValue);
secureSettings.setString("tribe.t1." + settingName, settingValue); secureSettings.setString("tribe.t1." + settingName, settingValue);
secureSettings.setString("tribe.t2." + settingName, settingValue); secureSettings.setString("tribe.t2." + settingName, settingValue);
} }
}
Settings merged = Settings.builder() Settings merged = Settings.builder()
.put(internalCluster().getDefaultSettings()) .put(internalCluster().getDefaultSettings())