summaryrefslogtreecommitdiffstats
path: root/vespa-osgi-testrunner
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2023-07-11 11:16:27 +0200
committerMartin Polden <mpolden@mpolden.no>2023-07-11 11:17:04 +0200
commit98f6f3e7752bd279c5e1bcae48ac92a3b54eb55c (patch)
tree53b467a9e1278e7b821ffc814334cd56d563a275 /vespa-osgi-testrunner
parent3008439ac5f2f2dfd0c5acccc1a6b8cf202f9933 (diff)
Set target from system
Diffstat (limited to 'vespa-osgi-testrunner')
-rw-r--r--vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/VespaCliTestRunner.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/VespaCliTestRunner.java b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/VespaCliTestRunner.java
index 274fa91a59c..5816cd54526 100644
--- a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/VespaCliTestRunner.java
+++ b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/VespaCliTestRunner.java
@@ -116,7 +116,7 @@ public class VespaCliTestRunner implements TestRunner {
ProcessBuilder builder = new ProcessBuilder("vespa", "test", suitePath.get().toAbsolutePath().toString(),
"--application", config.application().toFullString(),
"--zone", config.zone().value(),
- "--target", "cloud");
+ "--target", config.system().isPublic() ? "cloud" : "hosted");
builder.redirectErrorStream(true);
// The CI environment variables tells Vespa CLI to omit certain warnings that do not apply to CI environments
builder.environment().put("CI", "true");
@@ -130,13 +130,12 @@ public class VespaCliTestRunner implements TestRunner {
}
private static String toSuiteDirectoryName(Suite suite) {
- switch (suite) {
- case SYSTEM_TEST: return "system-test";
- case STAGING_SETUP_TEST: return "staging-setup";
- case STAGING_TEST: return "staging-test";
- case PRODUCTION_TEST: return "production-test";
- default: throw new IllegalArgumentException("Unsupported test suite '" + suite + "'");
- }
+ return switch (suite) {
+ case SYSTEM_TEST -> "system-test";
+ case STAGING_SETUP_TEST -> "staging-setup";
+ case STAGING_TEST -> "staging-test";
+ case PRODUCTION_TEST -> "production-test";
+ };
}
private void log(Level level, String message, Throwable thrown) {