summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHÃ¥kon Hallingstad <hakon@oath.com>2017-11-02 09:31:21 +0100
committerGitHub <noreply@github.com>2017-11-02 09:31:21 +0100
commit144fc7d79703bb9b2a6512413ab1b2d59a8e6ffd (patch)
tree252640abfe4e9bb51804b807784517b1acf3c4ac
parentb0d040c396106e1e1f3b3ea6966cfca4e01a79ca (diff)
parent93d628a79c7cc800a8ffd305b4a93ee720cb8ce3 (diff)
Merge pull request #3966 from vespa-engine/hakonhall/avoid-changing-api-before-all-clients-handle-it
Avoid changing API before all clients handle it
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/resources/HostResource.java6
-rw-r--r--orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostResourceTest.java17
2 files changed, 15 insertions, 8 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/resources/HostResource.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/resources/HostResource.java
index 52994db2b88..edfd35e0573 100644
--- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/resources/HostResource.java
+++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/resources/HostResource.java
@@ -68,11 +68,13 @@ public class HostResource implements HostApi {
serviceInstance.serviceStatus().name()))
.collect(Collectors.toList());
+ // TODO: Use applicationUri.toString() and hostServices once nobody is using <6.164
+ // TODO: Enable testing again in HostResourceTest.getHost_works
return new GetHostResponse(
host.getHostName().s(),
host.getHostStatus().name(),
- applicationUri.toString(),
- hostServices);
+ null,
+ null);
} catch (HostNameNotFoundException e) {
log.log(LogLevel.INFO, "Host not found: " + hostName);
throw new NotFoundException(e);
diff --git a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostResourceTest.java b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostResourceTest.java
index 65309440aee..ca0596d8926 100644
--- a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostResourceTest.java
+++ b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostResourceTest.java
@@ -48,6 +48,7 @@ import static com.yahoo.vespa.orchestrator.TestUtil.makeServiceClusterSet;
import static org.fest.assertions.Assertions.assertThat;
import static org.fest.assertions.Fail.fail;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doThrow;
@@ -357,13 +358,17 @@ public class HostResourceTest {
Collections.singletonList(serviceInstance));
when(orchestrator.getHost(hostName)).thenReturn(host);
GetHostResponse response = hostResource.getHost(hostName.s());
- assertEquals("https://foo.com/bar", response.applicationUrl());
assertEquals("hostname", response.hostname());
assertEquals("ALLOWED_TO_BE_DOWN", response.state());
- assertEquals(1, response.services().size());
- assertEquals("clusterId", response.services().get(0).clusterId);
- assertEquals("configId", response.services().get(0).configId);
- assertEquals("UP", response.services().get(0).serviceStatus);
- assertEquals("serviceType", response.services().get(0).serviceType);
+
+ // See TODO in HostResource:
+ // assertEquals("https://foo.com/bar", response.applicationUrl());
+ // assertEquals(1, response.services().size());
+ // assertEquals("clusterId", response.services().get(0).clusterId);
+ // assertEquals("configId", response.services().get(0).configId);
+ // assertEquals("UP", response.services().get(0).serviceStatus);
+ // assertEquals("serviceType", response.services().get(0).serviceType);
+ assertNull(response.applicationUrl());
+ assertNull(response.services());
}
}