diff options
author | Morten Tokle <mortent@verizonmedia.com> | 2020-07-02 13:09:39 +0200 |
---|---|---|
committer | Morten Tokle <mortent@verizonmedia.com> | 2020-07-02 13:09:39 +0200 |
commit | 4cb706250d9e87699921f2cd5a027d5c3c2faf9d (patch) | |
tree | 6ef3cf01868caa5a914a76ae68b037ef3d1d4063 /vespa-osgi-testrunner | |
parent | 4c62cb4cc5d29f4c4b9dc89c2b046c9ea7d8185e (diff) |
Depend on osgi testrunner and prepare to move handler
Diffstat (limited to 'vespa-osgi-testrunner')
3 files changed, 68 insertions, 0 deletions
diff --git a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/LegacyTestRunner.java b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/LegacyTestRunner.java new file mode 100644 index 00000000000..d3777152590 --- /dev/null +++ b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/LegacyTestRunner.java @@ -0,0 +1,21 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.testrunner.legacy; + +import java.util.Collection; +import java.util.logging.LogRecord; + +/** + * @author mortent + */ +public interface LegacyTestRunner { + + Collection<LogRecord> getLog(long after); + + Status getStatus(); + + void test(TestProfile testProfile, byte[] config); + + enum Status { + NOT_STARTED, RUNNING, FAILURE, ERROR, SUCCESS + } +} diff --git a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/TestProfile.java b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/TestProfile.java new file mode 100644 index 00000000000..60f4c15c40d --- /dev/null +++ b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/TestProfile.java @@ -0,0 +1,38 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.testrunner.legacy; + +import ai.vespa.hosted.api.TestDescriptor; + +/** + * @author valerijf + * @author jvenstad + */ +public enum TestProfile { + + SYSTEM_TEST("system, com.yahoo.vespa.tenant.systemtest.base.SystemTest", true, TestDescriptor.TestCategory.systemtest), + STAGING_SETUP_TEST("staging-setup", false, TestDescriptor.TestCategory.stagingsetuptest), + STAGING_TEST("staging, com.yahoo.vespa.tenant.systemtest.base.StagingTest", true, TestDescriptor.TestCategory.stagingtest), + PRODUCTION_TEST("production, com.yahoo.vespa.tenant.systemtest.base.ProductionTest", false, TestDescriptor.TestCategory.productiontest); + + private final String group; + private final boolean failIfNoTests; + private TestDescriptor.TestCategory testCategory; + + TestProfile(String group, boolean failIfNoTests, TestDescriptor.TestCategory testCategory) { + this.group = group; + this.failIfNoTests = failIfNoTests; + } + + public String group() { + return group; + } + + public boolean failIfNoTests() { + return failIfNoTests; + } + + TestDescriptor.TestCategory testCategory() { + return testCategory; + } + +} diff --git a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/package-info.java b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/package-info.java new file mode 100644 index 00000000000..49f6cef0c22 --- /dev/null +++ b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/legacy/package-info.java @@ -0,0 +1,9 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +/** + * @author mortent + */ +@ExportPackage +package com.yahoo.vespa.testrunner.legacy; + +import com.yahoo.osgi.annotation.ExportPackage;
\ No newline at end of file |