diff options
author | jonmv <venstad@gmail.com> | 2023-01-27 10:53:10 +0100 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-01-27 10:53:10 +0100 |
commit | dc4e5e85caef5d5279649359a16310e825540486 (patch) | |
tree | af6be40696da659e6e5b991140d6ea1a6d24a582 /controller-api | |
parent | 78a42e1cf9735f58e7f204f34e0cb2bd7c1a3674 (diff) |
Move container status.html check as well
Diffstat (limited to 'controller-api')
2 files changed, 5 insertions, 17 deletions
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<UnavailabilityCause> verifyEndpoints(List<Endpoint> endpoints); + Availability verifyEndpoints(List<Endpoint> endpoints); /** Returns the test report as JSON if available */ Optional<TestReport> 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; @@ -52,18 +51,13 @@ public class MockTesterCloud implements TesterCloud { 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<UnavailabilityCause> verifyEndpoints(List<Endpoint> endpoints) { - return EndpointsChecker.endpointsAvailable(endpoints, this::resolveHostName, this::resolveCname); + public Availability verifyEndpoints(List<Endpoint> endpoints) { + return EndpointsChecker.endpointsAvailable(endpoints, this::resolveHostName, this::resolveCname, __ -> true); } private Optional<InetAddress> resolveHostName(DomainName hostname) { |