diff options
author | Håkon Hallingstad <hakon@oath.com> | 2017-11-01 14:44:37 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@oath.com> | 2017-11-01 14:44:37 +0100 |
commit | 93d628a79c7cc800a8ffd305b4a93ee720cb8ce3 (patch) | |
tree | 2cc48dca60ad25ae22fa175e5f0044fe6d695864 /orchestrator | |
parent | 451f936c4d19ae8dc08332682d06c6caa3a39000 (diff) |
Avoid changing API before all clients handle it
Diffstat (limited to 'orchestrator')
-rw-r--r-- | orchestrator/src/main/java/com/yahoo/vespa/orchestrator/resources/HostResource.java | 6 | ||||
-rw-r--r-- | orchestrator/src/test/java/com/yahoo/vespa/orchestrator/resources/HostResourceTest.java | 17 |
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()); } } |