use of com.hazelcast.kubernetes.KubernetesClient.Endpoint in project hazelcast by hazelcast.
the class KubernetesApiProviderTest method parseEndpointsList.
@Test
public void parseEndpointsList() {
JsonObject endpointsListJson = Json.parse(getEndpointsListResponse()).asObject();
List<Endpoint> endpoints = provider.parseEndpointsList(endpointsListJson);
assertThat(format(endpoints), containsInAnyOrder(ready("192.168.0.25", 5702), ready("172.17.0.5", 5702), notReady("172.17.0.6", 5702)));
}
use of com.hazelcast.kubernetes.KubernetesClient.Endpoint in project hazelcast by hazelcast.
the class KubernetesApiProviderTest method parseEndpoints.
@Test
public void parseEndpoints() {
JsonObject endpointsListJson = Json.parse(getEndpointsResponse()).asObject();
List<Endpoint> endpoints = provider.parseEndpoints(endpointsListJson);
assertThat(format(endpoints), containsInAnyOrder(ready("192.168.0.25", 5701), ready("172.17.0.5", 5701)));
}
use of com.hazelcast.kubernetes.KubernetesClient.Endpoint in project hazelcast by hazelcast.
the class KubernetesClientTest method formatPublic.
private static List<String> formatPublic(List<Endpoint> addresses) {
List<String> result = new ArrayList<String>();
for (Endpoint address : addresses) {
String ip = address.getPublicAddress().getIp();
Integer port = address.getPublicAddress().getPort();
boolean isReady = address.isReady();
result.add(toString(ip, port, isReady));
}
return result;
}
use of com.hazelcast.kubernetes.KubernetesClient.Endpoint in project hazelcast by hazelcast.
the class KubernetesClientTest method format.
private static List<String> format(List<Endpoint> addresses) {
List<String> result = new ArrayList<String>();
for (Endpoint address : addresses) {
String ip = address.getPrivateAddress().getIp();
Integer port = address.getPrivateAddress().getPort();
boolean isReady = address.isReady();
result.add(toString(ip, port, isReady));
}
return result;
}
Aggregations