Added unknown host test for domains

This commit is contained in:
nsingh
2017-02-10 13:21:26 -08:00
parent 4e826a91d7
commit e0dd23498f

View File

@@ -73,6 +73,14 @@ public class CFClientTest {
CFTarget target = targetCache.getOrCreate().get(0);
assertError(() -> target.getBuildpacks(), ConnectionException.class, expectedMessages.noNetworkConnection());
}
@Test
public void testUnknownHostDomains() throws Exception {
ClientRequests client = cloudfoundry.client;
when(client.getDomains()).thenThrow(new UnknownHostException("api.run.pivotal.io"));
CFTarget target = targetCache.getOrCreate().get(0);
assertError(() -> target.getDomains(), ConnectionException.class, expectedMessages.noNetworkConnection());
}
@Test
public void testBuildpacksFromTarget() throws Exception {