From dc4e5e85caef5d5279649359a16310e825540486 Mon Sep 17 00:00:00 2001 From: jonmv Date: Fri, 27 Jan 2023 10:53:10 +0100 Subject: Move container status.html check as well --- .../controller/api/integration/deployment/TesterCloud.java | 10 ++-------- .../controller/api/integration/stubs/MockTesterCloud.java | 12 +++--------- 2 files changed, 5 insertions(+), 17 deletions(-) (limited to 'controller-api') diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java index edc5faefe65..9ad06a3311f 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java @@ -1,14 +1,11 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.deployment; -import ai.vespa.http.DomainName; import com.yahoo.config.provision.EndpointsChecker.Endpoint; -import com.yahoo.config.provision.EndpointsChecker.UnavailabilityCause; -import com.yahoo.config.provision.Environment; +import com.yahoo.config.provision.EndpointsChecker.Availability; import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId; import com.yahoo.vespa.hosted.controller.api.integration.LogEntry; -import java.net.InetAddress; import java.net.URI; import java.util.List; import java.util.Optional; @@ -29,13 +26,10 @@ public interface TesterCloud { /** Returns the current status of the tester. */ Status getStatus(DeploymentId deploymentId); - /** Returns whether the container is ready to serve. */ - boolean ready(URI endpointUrl); - /** Returns whether the test container is ready to serve */ boolean testerReady(DeploymentId deploymentId); - Optional verifyEndpoints(List endpoints); + Availability verifyEndpoints(List endpoints); /** Returns the test report as JSON if available */ Optional getTestReport(DeploymentId deploymentId); diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java index 7a819ecc1db..e9a7c8bad33 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java @@ -5,7 +5,7 @@ import ai.vespa.http.DomainName; import com.google.common.net.InetAddresses; import com.yahoo.config.provision.EndpointsChecker; import com.yahoo.config.provision.EndpointsChecker.Endpoint; -import com.yahoo.config.provision.EndpointsChecker.UnavailabilityCause; +import com.yahoo.config.provision.EndpointsChecker.Availability; import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId; import com.yahoo.vespa.hosted.controller.api.integration.LogEntry; import com.yahoo.vespa.hosted.controller.api.integration.deployment.TestReport; @@ -19,7 +19,6 @@ import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Optional; -import java.util.stream.Collectors; import static com.yahoo.vespa.hosted.controller.api.integration.deployment.TesterCloud.Status.NOT_STARTED; import static com.yahoo.vespa.hosted.controller.api.integration.deployment.TesterCloud.Status.RUNNING; @@ -51,19 +50,14 @@ public class MockTesterCloud implements TesterCloud { @Override public Status getStatus(DeploymentId deploymentId) { return status; } - @Override - public boolean ready(URI testerUrl) { - return true; - } - @Override public boolean testerReady(DeploymentId deploymentId) { return true; } @Override - public Optional verifyEndpoints(List endpoints) { - return EndpointsChecker.endpointsAvailable(endpoints, this::resolveHostName, this::resolveCname); + public Availability verifyEndpoints(List endpoints) { + return EndpointsChecker.endpointsAvailable(endpoints, this::resolveHostName, this::resolveCname, __ -> true); } private Optional resolveHostName(DomainName hostname) { -- cgit v1.2.3