use of com.netflix.discovery.shared.Applications in project eureka by Netflix.
the class EurekaHttpClientCompatibilityTestSuite method testGetSecureVipRequest.
@Test
public void testGetSecureVipRequest() throws Exception {
Applications vipApps = InstanceInfoGenerator.newBuilder(1, 2).build().toApplications();
String secureVipAddress = vipApps.getRegisteredApplications().get(0).getInstances().get(0).getSecureVipAddress();
when(requestHandler.getSecureVip(secureVipAddress)).thenReturn(createResponse(vipApps));
EurekaHttpResponse<Applications> httpResponse = getEurekaHttpClient().getSecureVip(secureVipAddress);
verifyResponseOkWithEntity(vipApps, httpResponse);
}
use of com.netflix.discovery.shared.Applications in project eureka by Netflix.
the class EurekaHttpClientCompatibilityTestSuite method testGetApplicationsWithRemoteRegionRequest.
@Test
public void testGetApplicationsWithRemoteRegionRequest() throws Exception {
Applications apps = InstanceInfoGenerator.newBuilder(2, 1).build().toApplications();
when(requestHandler.getApplications(REMOTE_REGION)).thenReturn(createResponse(apps));
EurekaHttpResponse<Applications> httpResponse = getEurekaHttpClient().getApplications(REMOTE_REGION);
verifyResponseOkWithEntity(apps, httpResponse);
}
use of com.netflix.discovery.shared.Applications in project eureka by Netflix.
the class EurekaHttpClientCompatibilityTestSuite method testGetDeltaWithRemoteRegionRequest.
@Test
public void testGetDeltaWithRemoteRegionRequest() throws Exception {
Applications delta = InstanceInfoGenerator.newBuilder(2, 1).build().takeDelta(2);
when(requestHandler.getDelta(REMOTE_REGION)).thenReturn(createResponse(delta));
EurekaHttpResponse<Applications> httpResponse = getEurekaHttpClient().getDelta(REMOTE_REGION);
verifyResponseOkWithEntity(delta, httpResponse);
}
use of com.netflix.discovery.shared.Applications in project eureka by Netflix.
the class EurekaHttpClientCompatibilityTestSuite method testGetDeltaRequest.
@Test
public void testGetDeltaRequest() throws Exception {
Applications delta = InstanceInfoGenerator.newBuilder(2, 1).build().takeDelta(2);
when(requestHandler.getDelta()).thenReturn(createResponse(delta));
EurekaHttpResponse<Applications> httpResponse = getEurekaHttpClient().getDelta();
verifyResponseOkWithEntity(delta, httpResponse);
}
use of com.netflix.discovery.shared.Applications in project eureka by Netflix.
the class EurekaHttpClientCompatibilityTestSuite method testGetSecureVipWithRemoteRegionRequest.
@Test
public void testGetSecureVipWithRemoteRegionRequest() throws Exception {
Applications vipApps = InstanceInfoGenerator.newBuilder(1, 2).build().toApplications();
String secureVipAddress = vipApps.getRegisteredApplications().get(0).getInstances().get(0).getSecureVipAddress();
when(requestHandler.getSecureVip(secureVipAddress, REMOTE_REGION)).thenReturn(createResponse(vipApps));
EurekaHttpResponse<Applications> httpResponse = getEurekaHttpClient().getSecureVip(secureVipAddress, REMOTE_REGION);
verifyResponseOkWithEntity(vipApps, httpResponse);
}
Aggregations