summaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/Testers.java
diff options
context:
space:
mode:
Diffstat (limited to 'controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/Testers.java')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/Testers.java59
1 files changed, 59 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/Testers.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/Testers.java
new file mode 100644
index 00000000000..dccc0e47ceb
--- /dev/null
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/Testers.java
@@ -0,0 +1,59 @@
+package com.yahoo.vespa.hosted.controller.api.integration.deployment;
+
+import java.net.URI;
+
+/**
+ * Allows running some predefined tests -- typically remotely.
+ *
+ * @author jonmv
+ */
+public interface Testers {
+
+ /** Signals the tester to run its tests. */
+ void startTests(URI testerUrl, Suite suite, byte[] config);
+
+ /** Returns the currently stored logs from the tester. */
+ byte[] getLogs(URI testerUrl);
+
+ /** Returns the current status of the tester. */
+ Status getStatus(URI testerUrl);
+
+
+ enum Status {
+
+ /** Tests have not yet started. */
+ NOT_STARTED,
+
+ /** Tests are running. */
+ RUNNING,
+
+ /** Tests failed. */
+ FAILURE,
+
+ /** The tester encountered an exception. */
+ ERROR,
+
+ /** The tests were successful. */
+ SUCCESS
+
+ }
+
+
+ enum Suite {
+
+ system,
+
+ staging,
+
+ production;
+
+ public static Suite of(JobType type) {
+ if (type == JobType.systemTest) return system;
+ if (type == JobType.stagingTest) return staging;
+ if (type.isProduction()) return production;
+ throw new AssertionError("Unknown JobType '" + type + "'!");
+ }
+
+ }
+
+}