summaryrefslogtreecommitdiffstats
path: root/cloud-tenant-cd
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2020-06-17 10:56:52 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2020-06-17 10:56:52 +0200
commit2b2485cd6f22ced3d35db372d5d5ca140b005911 (patch)
tree32e29b807e32357d1fa1970acf063ad865086b55 /cloud-tenant-cd
parentecd4e0c09f20733f177fcd90c6f986f0202d1e96 (diff)
Add zone() to TestRuntime
Diffstat (limited to 'cloud-tenant-cd')
-rw-r--r--cloud-tenant-cd/pom.xml12
-rw-r--r--cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/VespaTestRuntime.java17
2 files changed, 18 insertions, 11 deletions
diff --git a/cloud-tenant-cd/pom.xml b/cloud-tenant-cd/pom.xml
index b61e06eba04..ba4b7d02020 100644
--- a/cloud-tenant-cd/pom.xml
+++ b/cloud-tenant-cd/pom.xml
@@ -37,6 +37,12 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>com.yahoo.vespa</groupId>
+ <artifactId>hosted-zone-api</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
<!-- compile scope -->
<dependency>
@@ -51,6 +57,12 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>com.yahoo.vespa</groupId>
+ <artifactId>config-provisioning</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/VespaTestRuntime.java b/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/VespaTestRuntime.java
index f77716064e5..75aaaec78ba 100644
--- a/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/VespaTestRuntime.java
+++ b/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/VespaTestRuntime.java
@@ -1,6 +1,7 @@
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.hosted.cd;
+import ai.vespa.cloud.Zone;
import ai.vespa.hosted.api.ControllerHttpClient;
import ai.vespa.hosted.api.Properties;
import ai.vespa.hosted.api.TestConfig;
@@ -26,17 +27,11 @@ public class VespaTestRuntime implements TestRuntime {
this.deploymentToTest = new HttpDeployment(config.deployments().get(config.zone()), new ai.vespa.hosted.auth.EndpointAuthenticator(config.system()));
}
-// In use ?
-// /** Returns a copy of this runtime, with the given endpoint authenticator. */
-// public TestRuntime with(EndpointAuthenticator authenticator) {
-// return new TestRuntime(config, authenticator);
-// }
-
- /** Returns the full id of the application this is testing. */
- public ApplicationId application() { return config.application(); }
-
- /** Returns the zone of the deployment this is testing. */
- public ZoneId zone() { return config.zone(); }
+ @Override
+ public Zone zone() {
+ return new Zone(
+ ai.vespa.cloud.Environment.valueOf(config.zone().environment().name()),
+ config.zone().region().value()); }
/** Returns the deployment this is testing. */
@Override