aboutsummaryrefslogtreecommitdiffstats
path: root/hosted-api/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'hosted-api/src/test')
-rw-r--r--hosted-api/src/test/java/ai/vespa/hosted/api/TestDescriptorTest.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/hosted-api/src/test/java/ai/vespa/hosted/api/TestDescriptorTest.java b/hosted-api/src/test/java/ai/vespa/hosted/api/TestDescriptorTest.java
index 7e59af9ced8..f45c1219e9d 100644
--- a/hosted-api/src/test/java/ai/vespa/hosted/api/TestDescriptorTest.java
+++ b/hosted-api/src/test/java/ai/vespa/hosted/api/TestDescriptorTest.java
@@ -33,14 +33,19 @@ public class TestDescriptorTest {
var stagingTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.stagingtest);
Assertions.assertIterableEquals(Collections.emptyList(), stagingTests);
+ var stagingSetupTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.stagingtest);
+ Assertions.assertIterableEquals(Collections.emptyList(), stagingSetupTests);
+
var productionTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.productiontest);
Assertions.assertIterableEquals(Collections.emptyList(), productionTests);
}
@Test
public void parsesDescriptorFile() {
+ //language=JSON
String testDescriptor = "{\n" +
- " \"version\": \"1.0\",\n" +
+ " \"" +
+ "version\": \"1.0\",\n" +
" \"configuredTests\": {\n" +
" \"systemTests\": [\n" +
" \"ai.vespa.test.SystemTest1\",\n" +
@@ -50,6 +55,10 @@ public class TestDescriptorTest {
" \"ai.vespa.test.StagingTest1\",\n" +
" \"ai.vespa.test.StagingTest2\"\n" +
" ],\n" +
+ " \"stagingSetupTests\": [\n" +
+ " \"ai.vespa.test.StagingSetupTest1\",\n" +
+ " \"ai.vespa.test.StagingSetupTest2\"\n" +
+ " ],\n" +
" \"productionTests\": [\n" +
" \"ai.vespa.test.ProductionTest1\",\n" +
" \"ai.vespa.test.ProductionTest2\"\n" +
@@ -65,8 +74,13 @@ public class TestDescriptorTest {
var stagingTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.stagingtest);
Assertions.assertIterableEquals(List.of("ai.vespa.test.StagingTest1", "ai.vespa.test.StagingTest2"), stagingTests);
+ var stagingSetupTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.stagingsetuptest);
+ Assertions.assertIterableEquals(List.of("ai.vespa.test.StagingSetupTest1", "ai.vespa.test.StagingSetupTest2"), stagingSetupTests);
+
var productionTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.productiontest);
Assertions.assertIterableEquals(List.of("ai.vespa.test.ProductionTest1", "ai.vespa.test.ProductionTest2"), productionTests);
+
+ JsonTestHelper.assertJsonEquals(testClassDescriptor.toJson(), testDescriptor);
}
@Test