[TEST] Removed discovery configuration from transport clients settings

Also removed unused copyFile method

Original commit: elastic/x-pack-elasticsearch@2d96e05ded
This commit is contained in:
javanna 2014-08-28 13:57:06 +02:00 committed by Luca Cavanna
parent d0e377ff76
commit 929e12e9cb
1 changed files with 1 additions and 15 deletions

View File

@ -26,7 +26,6 @@ import org.junit.rules.TemporaryFolder;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder; import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilder;
@ -88,8 +87,6 @@ public abstract class ShieldIntegrationTest extends ElasticsearchIntegrationTest
.put(TransportModule.TRANSPORT_TYPE_KEY, NettySecuredTransport.class.getName()) .put(TransportModule.TRANSPORT_TYPE_KEY, NettySecuredTransport.class.getName())
.put("plugins." + PluginsService.LOAD_PLUGIN_FROM_CLASSPATH, false) .put("plugins." + PluginsService.LOAD_PLUGIN_FROM_CLASSPATH, false)
.put("node.mode", "network") .put("node.mode", "network")
.put("discovery.zen.ping.multicast.ping.enabled", false)
.putArray("discovery.zen.ping.unicast.hosts", getUnicastHostAddress())
.put(getSSLSettingsForStore("/org/elasticsearch/shield/transport/ssl/certs/simple/testclient.jks", "testclient")) .put(getSSLSettingsForStore("/org/elasticsearch/shield/transport/ssl/certs/simple/testclient.jks", "testclient"))
.build(); .build();
} }
@ -113,7 +110,7 @@ public abstract class ShieldIntegrationTest extends ElasticsearchIntegrationTest
protected String getClientUsername() { protected String getClientUsername() {
return DEFAULT_USER_NAME; return DEFAULT_USER_NAME;
}; }
protected String getClientPassword() { protected String getClientPassword() {
return DEFAULT_PASSWORD; return DEFAULT_PASSWORD;
@ -153,15 +150,4 @@ public abstract class ShieldIntegrationTest extends ElasticsearchIntegrationTest
return null; return null;
} }
} }
protected String copyFile(File folder, String name) {
Path file = folder.toPath().resolve(name);
try {
Files.copy(getClass().getResourceAsStream(name), file);
} catch (IOException ioe) {
logger.error("could not copy temporary configuration file [" + name + "]", ioe);
fail("could not copy temporary configuration file [" + name + "]");
}
return file.toAbsolutePath().toString();
}
} }