mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 14:35:04 +00:00
Testing: Remove randomization on osx
The randomization of the `network.host` property on OSX only could lead to connecting to the wrong HTTP port in our functional tests. As this randomization is not really needed, we can simply remove it Closes elastic/elasticsearch#586 Original commit: elastic/x-pack-elasticsearch@fb16bd8644
This commit is contained in:
parent
a6b992b1ea
commit
d9023abfd0
@ -7,8 +7,6 @@ package org.elasticsearch.test;
|
||||
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.client.support.Headers;
|
||||
import org.elasticsearch.common.io.FileSystemUtils;
|
||||
import org.elasticsearch.common.os.OsUtils;
|
||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.license.plugin.LicensePlugin;
|
||||
@ -25,10 +23,10 @@ import org.elasticsearch.test.discovery.ClusterDiscoveryConfiguration;
|
||||
import java.io.File;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomBoolean;
|
||||
import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;
|
||||
import static org.elasticsearch.shield.authc.support.UsernamePasswordToken.basicAuthHeaderValue;
|
||||
import static org.elasticsearch.shield.test.ShieldTestUtils.writeFile;
|
||||
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomBoolean;
|
||||
|
||||
/**
|
||||
* {@link org.elasticsearch.test.SettingsSource} subclass that allows to set all needed settings for shield.
|
||||
@ -120,12 +118,6 @@ public class ShieldSettingsSource extends ClusterDiscoveryConfiguration.UnicastZ
|
||||
.put("shield.authz.store.files.roles", writeFile(folder, "roles.yml", configRoles()))
|
||||
.put(getNodeSSLSettings());
|
||||
|
||||
//the random call has to happen all the time for repeatability
|
||||
String networkHost = randomBoolean() ? "127.0.0.1" : "::1";
|
||||
if (OsUtils.MAC) {
|
||||
builder.put("network.host", networkHost);
|
||||
}
|
||||
|
||||
setUser(builder, nodeClientUsername(), nodeClientPassword());
|
||||
|
||||
return builder.build();
|
||||
|
Loading…
x
Reference in New Issue
Block a user