aboutsummaryrefslogtreecommitdiffstats
path: root/hosted-api/src/main
diff options
context:
space:
mode:
authorMorten Tokle <mortent@verizonmedia.com>2020-07-02 12:57:39 +0200
committerMorten Tokle <mortent@verizonmedia.com>2020-07-02 12:58:35 +0200
commit4c62cb4cc5d29f4c4b9dc89c2b046c9ea7d8185e (patch)
treefc83224df58c3fd8fc6890f18854ac79e70cee7d /hosted-api/src/main
parent87372a16c7ec43a5babcf44bb5ff109ac3369b2e (diff)
Support staging setup tests
Diffstat (limited to 'hosted-api/src/main')
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/TestDescriptor.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/TestDescriptor.java b/hosted-api/src/main/java/ai/vespa/hosted/api/TestDescriptor.java
index 08cd3932ae7..6074bd73a20 100644
--- a/hosted-api/src/main/java/ai/vespa/hosted/api/TestDescriptor.java
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/TestDescriptor.java
@@ -26,6 +26,7 @@ public class TestDescriptor {
private static final String JSON_FIELD_CONFIGURED_TESTS = "configuredTests";
private static final String JSON_FIELD_SYSTEM_TESTS = "systemTests";
private static final String JSON_FIELD_STAGING_TESTS = "stagingTests";
+ private static final String JSON_FIELD_STAGING_SETUP_TESTS = "stagingSetupTests";
private static final String JSON_FIELD_PRODUCTION_TESTS = "productionTests";
private final Map<TestCategory, List<String>> configuredTestClasses;
@@ -43,20 +44,22 @@ public class TestDescriptor {
var testRoot = root.field(JSON_FIELD_CONFIGURED_TESTS);
var systemTests = getJsonArray(testRoot, JSON_FIELD_SYSTEM_TESTS);
var stagingTests = getJsonArray(testRoot, JSON_FIELD_STAGING_TESTS);
+ var stagingSetupTests = getJsonArray(testRoot, JSON_FIELD_STAGING_SETUP_TESTS);
var productionTests = getJsonArray(testRoot, JSON_FIELD_PRODUCTION_TESTS);
- return new TestDescriptor(version, toMap(systemTests, stagingTests, productionTests));
+ return new TestDescriptor(version, toMap(systemTests, stagingTests, stagingSetupTests, productionTests));
}
public static TestDescriptor from(
- String version, List<String> systemTests, List<String> stagingTests, List<String> productionTests) {
- return new TestDescriptor(version, toMap(systemTests, stagingTests, productionTests));
+ String version, List<String> systemTests, List<String> stagingTests, List<String> stagingSetupTests, List<String> productionTests) {
+ return new TestDescriptor(version, toMap(systemTests, stagingTests, stagingSetupTests, productionTests));
}
private static Map<TestCategory, List<String>> toMap(
- List<String> systemTests, List<String> stagingTests, List<String> productionTests) {
+ List<String> systemTests, List<String> stagingTests, List<String> stagingSetupTests, List<String> productionTests) {
return Map.of(
TestCategory.systemtest, systemTests,
TestCategory.stagingtest, stagingTests,
+ TestCategory.stagingsetuptest, stagingSetupTests,
TestCategory.productiontest, productionTests
);
}
@@ -81,6 +84,7 @@ public class TestDescriptor {
addJsonArrayForTests(tests, JSON_FIELD_SYSTEM_TESTS, TestCategory.systemtest);
addJsonArrayForTests(tests, JSON_FIELD_STAGING_TESTS, TestCategory.stagingtest);
addJsonArrayForTests(tests, JSON_FIELD_PRODUCTION_TESTS, TestCategory.productiontest);
+ addJsonArrayForTests(tests, JSON_FIELD_STAGING_SETUP_TESTS, TestCategory.stagingsetuptest);
ByteArrayOutputStream out = new ByteArrayOutputStream();
uncheck(() -> new JsonFormat(/*compact*/false).encode(out, slime));
return out.toString();
@@ -100,5 +104,5 @@ public class TestDescriptor {
'}';
}
- public enum TestCategory {systemtest, stagingtest, productiontest}
+ public enum TestCategory {systemtest, stagingsetuptest, stagingtest, productiontest}
}