use of com.netflix.appinfo.EurekaAccept in project eureka by Netflix.
the class AbstractVIPResourceTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
InstanceInfoGenerator instanceInfos = InstanceInfoGenerator.newBuilder(6, 1).build();
testApplication = instanceInfos.toApplications().getRegisteredApplications().get(0);
resource = new AbstractVIPResource(serverContext) {
@Override
protected Response getVipResponse(String version, String entityName, String acceptHeader, EurekaAccept eurekaAccept, Key.EntityType entityType) {
return super.getVipResponse(version, entityName, acceptHeader, eurekaAccept, entityType);
}
};
vipName = testApplication.getName() + "#VIP";
for (InstanceInfo instanceInfo : testApplication.getInstances()) {
InstanceInfo changed = new InstanceInfo.Builder(instanceInfo).setASGName(// null asgName to get around AwsAsgUtil check
null).setVIPAddress(// use the same vip address for all the instances in this test
vipName).build();
registry.register(changed, false);
}
}
Aggregations