use of com.microsoft.azure.management.network.implementation.LoadBalancerInner in project photon-model by vmware.
the class AzureLoadBalancerServiceTest method testDeleteLoadBalancer.
@Test
public void testDeleteLoadBalancer() throws Throwable {
LoadBalancerState loadBalancerState = provisionLoadBalancer(TaskStage.FINISHED, null);
startLoadBalancerProvisioning(LoadBalancerInstanceRequest.InstanceRequestType.DELETE, loadBalancerState, TaskStage.FINISHED);
// verify load balancer state was deleted
try {
getLoadBalancerState(this.host, loadBalancerState.documentSelfLink);
} catch (Throwable e) {
assertTrue(e instanceof ServiceHost.ServiceNotFoundException);
}
if (!this.isMock) {
// Verify that the load balancer was deleted from Azure.
LoadBalancerInner sgResponse = this.loadBalancerClient.getByResourceGroup(this.rgName, this.loadBalancerName);
if (sgResponse != null) {
fail("Load Balancer should not exist in Azure.");
}
}
}
Aggregations