use of com.sequenceiq.cloudbreak.cloud.model.network.NetworkResourcesCreationRequest in project cloudbreak by hortonworks.
the class AzureNetworkConnectorTest method testCreateProviderSpecificNetworkResourcesWhenPrivateEndpoint.
@Test
public void testCreateProviderSpecificNetworkResourcesWhenPrivateEndpoint() {
NetworkResourcesCreationRequest request = createProviderSpecificNetworkResources(true);
AuthenticatedContext authenticatedContext = new AuthenticatedContext(request.getCloudContext(), request.getCloudCredential());
when(azureClientService.getClient(request.getCloudCredential())).thenReturn(azureClient);
underTest.createProviderSpecificNetworkResources(request);
verify(azureDnsZoneService).checkOrCreateDnsZones(authenticatedContext, azureClient, getNetworkView(), RESOURCE_GROUP, getTags(), Set.of(AzurePrivateDnsZoneServiceEnum.POSTGRES));
verify(azureNetworkLinkService).checkOrCreateNetworkLinks(authenticatedContext, azureClient, getNetworkView(), RESOURCE_GROUP, getTags(), Set.of(AzurePrivateDnsZoneServiceEnum.POSTGRES));
}
use of com.sequenceiq.cloudbreak.cloud.model.network.NetworkResourcesCreationRequest in project cloudbreak by hortonworks.
the class AzureNetworkConnectorTest method testCreateProviderSpecificNetworkResourcesShouldRun.
@Test
public void testCreateProviderSpecificNetworkResourcesShouldRun() {
NetworkResourcesCreationRequest request = createProviderSpecificNetworkResources();
AuthenticatedContext authenticatedContext = new AuthenticatedContext(request.getCloudContext(), request.getCloudCredential());
when(azureClientService.getClient(request.getCloudCredential())).thenReturn(azureClient);
underTest.createProviderSpecificNetworkResources(request);
verify(azureDnsZoneService).checkOrCreateDnsZones(authenticatedContext, azureClient, getNetworkView(), RESOURCE_GROUP, getTags());
verify(azureNetworkLinkService).checkOrCreateNetworkLinks(authenticatedContext, azureClient, getNetworkView(), RESOURCE_GROUP, getTags());
}
Aggregations