diff options
author | Valerij Fredriksen <freva@users.noreply.github.com> | 2017-01-18 12:47:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-18 12:47:54 +0100 |
commit | 06ab8d7664fa79b89b2cb65e18d643d0557cede8 (patch) | |
tree | 94c4b66ff4057de276b68272a12ec4963eeb621a /docker-api | |
parent | d4d703c509ce0759a5eabfd7bed166a1c828c3b3 (diff) | |
parent | eae5c7ba317c8be8c429d3f460eb0364099c003a (diff) |
Merge pull request #1529 from yahoo/musum/allow-multiple-systest-hosts
Allow multiple systest nodes and turn off TLS
Diffstat (limited to 'docker-api')
-rw-r--r-- | docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java b/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java index c4c506c0ac1..e7a695f85b2 100644 --- a/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java +++ b/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java @@ -12,6 +12,8 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; +import java.util.Collections; +import java.util.List; import java.util.Optional; import java.util.concurrent.ExecutionException; import java.util.logging.Logger; @@ -70,12 +72,24 @@ public class RunSystemTests { * tests/search/basicsearch/basic_search.rb */ void runSystemTest(ContainerName systemtestHost, Path systemtestToRun, String... arguments) throws InterruptedException, ExecutionException, IOException { - startSystemTestNodeIfNeeded(systemtestHost); + runSystemTest(Collections.singletonList(systemtestHost), systemtestToRun, arguments); + } + + /** + * @param systemtestHosts name of the containers that will be used in the test, if some of them doe not exist, new + * ones will be started. First in list will be used as system test controller + * @param systemtestToRun relative path from the root of systemtests to the test to run, f.ex. + * tests/search/basicsearch/basic_search.rb + */ + void runSystemTest(List<ContainerName> systemtestHosts, Path systemtestToRun, String... arguments) throws InterruptedException, ExecutionException, IOException { + for (ContainerName systemtestHost : systemtestHosts) { + startSystemTestNodeIfNeeded(systemtestHost); + } - Path pathToSystetestToRun = pathToSystemtestsInContainer.resolve(systemtestToRun); + Path pathToSystestToRun = pathToSystemtestsInContainer.resolve(systemtestToRun); - logger.info("Running test " + pathToSystetestToRun); - Integer testExitCode = runTest(systemtestHost, pathToSystetestToRun, arguments); + logger.info("Running test " + pathToSystestToRun); + Integer testExitCode = runTest(systemtestHosts.get(0), pathToSystestToRun, arguments); assertEquals("Test did not finish with exit code 0", Integer.valueOf(0), testExitCode); } @@ -83,7 +97,7 @@ public class RunSystemTests { * This method runs mvn install inside container to update container's local repository, then copies any * existing and updated file from target to /home/y/lib/jars. * - * Because it runs as root we have to temporarly move around the target/ otherwise mvn will overwrite it and + * Because it runs as root we have to temporarily move around the target/ otherwise mvn will overwrite it and * as root, making mvn on host fail next time it runs. * * @param containerName name of the container to install modules in, if it does not exist, a new @@ -137,6 +151,7 @@ public class RunSystemTests { .withNetworkMode(DockerImpl.DOCKER_CUSTOM_MACVLAN_NETWORK_NAME) .withIpAddress(nodeInetAddress) .withEnvironment("USER", "root") + .withEnvironment("VESPA_SYSTEM_TEST_USE_TLS", "false") .withUlimit("nofile", 16384, 16384) .withUlimit("nproc", 409600, 409600) .withUlimit("core", -1, -1) |