summaryrefslogtreecommitdiffstats
path: root/cloud-tenant-cd/src
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/src
parentecd4e0c09f20733f177fcd90c6f986f0202d1e96 (diff)
Add zone() to TestRuntime
Diffstat (limited to 'cloud-tenant-cd/src')
-rw-r--r--cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/VespaTestRuntime.java17
1 files changed, 6 insertions, 11 deletions
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