[TEST] Set proper "transport.type" for transport client in IndexAuditTrailTests
Fixes issues seen on CI. relates elastic/x-pack-elasticsearch#2115 Original commit: elastic/x-pack-elasticsearch@0094225a2e
This commit is contained in:
parent
f99838e1bf
commit
40174e4dcf
|
@ -142,9 +142,7 @@ public class SecuritySettingsSource extends ClusterDiscoveryConfiguration.Unicas
|
||||||
Settings superSettings = super.transportClientSettings();
|
Settings superSettings = super.transportClientSettings();
|
||||||
Settings.Builder builder = Settings.builder().put(superSettings);
|
Settings.Builder builder = Settings.builder().put(superSettings);
|
||||||
addClientSSLSettings(builder, "");
|
addClientSSLSettings(builder, "");
|
||||||
if (NetworkModule.TRANSPORT_TYPE_SETTING.exists(superSettings) == false) {
|
addDefaultSecurityTransportType(builder, superSettings);
|
||||||
builder.put(NetworkModule.TRANSPORT_TYPE_SETTING.getKey(), Security.NAME4);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (randomBoolean()) {
|
if (randomBoolean()) {
|
||||||
builder.put(Security.USER_SETTING.getKey(),
|
builder.put(Security.USER_SETTING.getKey(),
|
||||||
|
@ -156,6 +154,12 @@ public class SecuritySettingsSource extends ClusterDiscoveryConfiguration.Unicas
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void addDefaultSecurityTransportType(Settings.Builder builder, Settings settings) {
|
||||||
|
if (NetworkModule.TRANSPORT_TYPE_SETTING.exists(settings) == false) {
|
||||||
|
builder.put(NetworkModule.TRANSPORT_TYPE_SETTING.getKey(), Security.NAME4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Class<? extends Plugin>> nodePlugins() {
|
public Collection<Class<? extends Plugin>> nodePlugins() {
|
||||||
return Arrays.asList(xpackPluginClass(),
|
return Arrays.asList(xpackPluginClass(),
|
||||||
|
|
|
@ -165,6 +165,13 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase {
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addDefaultSecurityTransportType(Settings.Builder builder, Settings settings) {
|
||||||
|
if (useSecurity) {
|
||||||
|
super.addDefaultSecurityTransportType(builder, settings);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue