From 2b2485cd6f22ced3d35db372d5d5ca140b005911 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Wed, 17 Jun 2020 10:56:52 +0200 Subject: Add zone() to TestRuntime --- .../main/java/ai/vespa/hosted/cd/VespaTestRuntime.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'cloud-tenant-cd/src') 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 -- cgit v1.2.3