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