summaryrefslogtreecommitdiffstats
path: root/vespa-osgi-testrunner
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2020-06-22 16:58:28 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2020-06-22 16:58:28 +0200
commit2a9fef2d14bb4735ad59244f1af8a7b6971fd8f8 (patch)
tree49fcecce5641b7a429f60862f628725971dd1559 /vespa-osgi-testrunner
parentab8f58e24925b3ae944b7099726372f5726f7cd2 (diff)
Move unit test to same location as class being tested
Diffstat (limited to 'vespa-osgi-testrunner')
-rw-r--r--vespa-osgi-testrunner/src/test/java/TestDescriptorTest.java70
1 files changed, 0 insertions, 70 deletions
diff --git a/vespa-osgi-testrunner/src/test/java/TestDescriptorTest.java b/vespa-osgi-testrunner/src/test/java/TestDescriptorTest.java
deleted file mode 100644
index 9462a52ed9f..00000000000
--- a/vespa-osgi-testrunner/src/test/java/TestDescriptorTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-import com.yahoo.vespa.testrunner.TestDescriptor;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author mortent
- */
-public class TestDescriptorTest {
-
- @Test
- public void parses_system_test_only () {
- String testDescriptor = "{\n" +
- " \"version\": \"1.0\",\n" +
- " \"configuredTests\": {\n" +
- " \"systemTests\": [\n" +
- " \"ai.vespa.test.SystemTest1\",\n" +
- " \"ai.vespa.test.SystemTest2\"\n" +
- " ]\n" +
- " " +
- "}\n" +
- "}";
- var testClassDescriptor = TestDescriptor.fromJsonString(testDescriptor);
-
- var systemTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.systemtest);
- Assertions.assertIterableEquals(List.of("ai.vespa.test.SystemTest1", "ai.vespa.test.SystemTest2"), systemTests);
-
- var stagingTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.stagingtest);
- Assertions.assertIterableEquals(Collections.emptyList(), stagingTests);
-
- var productionTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.productiontest);
- Assertions.assertIterableEquals(Collections.emptyList(), productionTests);
- }
-
- @Test
- public void parsesDescriptorFile() {
- String testDescriptor = "{\n" +
- " \"version\": \"1.0\",\n" +
- " \"configuredTests\": {\n" +
- " \"systemTests\": [\n" +
- " \"ai.vespa.test.SystemTest1\",\n" +
- " \"ai.vespa.test.SystemTest2\"\n" +
- " ],\n" +
- " \"stagingTests\": [\n" +
- " \"ai.vespa.test.StagingTest1\",\n" +
- " \"ai.vespa.test.StagingTest2\"\n" +
- " ],\n" +
- " \"productionTests\": [\n" +
- " \"ai.vespa.test.ProductionTest1\",\n" +
- " \"ai.vespa.test.ProductionTest2\"\n" +
- " ]\n" +
- " " +
- "}\n" +
- "}";
- var testClassDescriptor = TestDescriptor.fromJsonString(testDescriptor);
-
- var systemTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.systemtest);
- Assertions.assertIterableEquals(List.of("ai.vespa.test.SystemTest1", "ai.vespa.test.SystemTest2"), systemTests);
-
- var stagingTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.stagingtest);
- Assertions.assertIterableEquals(List.of("ai.vespa.test.StagingTest1", "ai.vespa.test.StagingTest2"), stagingTests);
-
- var productionTests = testClassDescriptor.getConfiguredTests(TestDescriptor.TestCategory.productiontest);
- Assertions.assertIterableEquals(List.of("ai.vespa.test.ProductionTest1", "ai.vespa.test.ProductionTest2"), productionTests);
- }
-}