use of bio.terra.buffer.service.resource.flight.CreateResourceRecordSetStep.RESTRICT_API_CNAME_RECORD in project terra-resource-buffer by DataBiosphere.
the class CreateProjectFlightIntegrationTest method assertDnsExists.
private void assertDnsExists(Project project) throws Exception {
String projectId = project.getProjectId();
ManagedZone managedZone = dnsCow.managedZones().get(projectId, MANAGED_ZONE_NAME).execute();
Map<String, ResourceRecordSet> resourceRecordSets = dnsCow.resourceRecordSets().list(project.getProjectId(), MANAGED_ZONE_NAME).execute().getRrsets().stream().collect(Collectors.toMap(ResourceRecordSet::getType, r -> r));
ResourceRecordSet aRecordSet = resourceRecordSets.get(RESTRICT_API_A_RECORD.getType());
ResourceRecordSet cnameRecordSet = resourceRecordSets.get(RESTRICT_API_CNAME_RECORD.getType());
assertEquals(MANAGED_ZONE_TEMPLATE.getName(), managedZone.getName());
assertEquals(MANAGED_ZONE_TEMPLATE.getVisibility(), managedZone.getVisibility().toLowerCase());
assertEquals(MANAGED_ZONE_TEMPLATE.getDescription(), managedZone.getDescription());
assertResourceRecordSetMatch(RESTRICT_API_A_RECORD, aRecordSet);
assertResourceRecordSetMatch(RESTRICT_API_CNAME_RECORD, cnameRecordSet);
}
Aggregations