use of com.amazonaws.services.route53.model.ChangeInfo in project Synapse-Stack-Builder by Sage-Bionetworks.
the class Route53SetupTest method testSetupResourcesAllFound.
@Ignore
@Test
public void testSetupResourcesAllFound() throws Exception {
String stack = "stack";
String hostedZoneDomainName = stack + ".sagebase.org.";
ListHostedZonesResult res = new ListHostedZonesResult();
List<HostedZone> expectedHostedZones = new ArrayList<HostedZone>();
HostedZone hz = new HostedZone().withName(hostedZoneDomainName);
expectedHostedZones.add(hz);
hz = new HostedZone().withName("anotherzone.sagebase.org.");
expectedHostedZones.add(hz);
res.setHostedZones(expectedHostedZones);
Map<ListResourceRecordSetsRequest, ListResourceRecordSetsResult> expectedResourceRecordSetsResults = TestHelper.createListExpectedListResourceRecordSetsRequestAllFound(stack);
when(mockClient.listHostedZones()).thenReturn(res);
// Args for getResourceRecordSetForRecordName().listResourceRecordSets()
for (ListResourceRecordSetsRequest req : expectedResourceRecordSetsResults.keySet()) {
when(mockClient.listResourceRecordSets(req)).thenReturn(expectedResourceRecordSetsResults.get(req));
}
ChangeInfo expectedChangeInfo = new ChangeInfo().withId("changeInfoId").withStatus(ChangeStatus.INSYNC);
ChangeResourceRecordSetsResult expectedChangeResourceRecordSetsResult = new ChangeResourceRecordSetsResult().withChangeInfo(expectedChangeInfo);
when(mockClient.changeResourceRecordSets(any(ChangeResourceRecordSetsRequest.class))).thenReturn(expectedChangeResourceRecordSetsResult);
Route53Setup r53Setup = new Route53Setup(factory, config, resources);
}
Aggregations