use of com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider in project cloudbreak by hortonworks.
the class VmTypeTests method testCountAzureVMTypesForCredentialInDefaultRegion.
@Test(priority = 1, groups = "vmtypes")
public void testCountAzureVMTypesForCredentialInDefaultRegion() throws Exception {
AzureCloudProvider provider = new AzureCloudProvider(getTestParameter());
given(CloudbreakClient.isCreated());
given(provider.aValidCredential().withName(AZURE_CRED_NAME), "Azure credential is created");
given(VmType.request().withPlatform(provider.getPlatform()).withRegion(provider.region()).withAvailabilityZone(provider.availabilityZone()), "Azure vm type request");
when(VmType.getPlatformVmTypes(), "vm types are requested to Azure credential and " + provider.region() + " region.");
then(VmType.assertThis((vmtype, t) -> {
int regionVirtualMachinesCount = vmtype.getResponse().getVmTypes().get(provider.region()).getVirtualMachines().size();
LOGGER.info("Number of Azure Virtual Machines in {} region ::: {}", provider.region(), regionVirtualMachinesCount);
Assert.assertTrue(regionVirtualMachinesCount > 0, "Number of Azure Virtual Machines should be present in response" + " for default region!");
}), "Azure Virtual Machines should be part of the response.");
}
use of com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider in project cloudbreak by hortonworks.
the class VmTypeTests method testListAzureVMTypesForCredentialInDefaultRegion.
@Test(priority = 5, groups = "vmtypes")
public void testListAzureVMTypesForCredentialInDefaultRegion() throws Exception {
AzureCloudProvider provider = new AzureCloudProvider(getTestParameter());
given(CloudbreakClient.isCreated());
given(provider.aValidCredential().withName(AZURE_CRED_NAME), "Azure credential is created");
given(VmType.request().withPlatform(provider.getPlatform()).withRegion(provider.region()).withAvailabilityZone(provider.availabilityZone()), "Azure vm type request");
when(VmType.getPlatformVmTypes(), "vm types are requested to Azure credential and " + provider.region() + " region.");
then(VmType.assertThis((vmtype, t) -> {
Set<VmTypeJson> regionVirtualMachines = vmtype.getResponse().getVmTypes().get(provider.region()).getVirtualMachines();
Assert.assertFalse(regionVirtualMachines.isEmpty(), "Azure Virtual Machines should be present in response for default region!");
}), "Virtual Machines should be part of the response.");
}
use of com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider in project cloudbreak by hortonworks.
the class DiskTypeTests method testListAzureDefaultDisks.
@Test(priority = 3, groups = "disktypes")
public void testListAzureDefaultDisks() throws Exception {
AzureCloudProvider provider = new AzureCloudProvider(getTestParameter());
listDefaultDisksForProvdier(provider);
}
use of com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider in project cloudbreak by hortonworks.
the class DiskTypeTests method testListAzureDiskMappings.
@Test(priority = 11, groups = "disktypes")
public void testListAzureDiskMappings() throws Exception {
AzureCloudProvider provider = new AzureCloudProvider(getTestParameter());
listDiskMappingsForProvider(provider);
}
use of com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider in project cloudbreak by hortonworks.
the class DiskTypeTests method testListAzureDisplayNames.
@Test(priority = 7, groups = "disktypes")
public void testListAzureDisplayNames() throws Exception {
AzureCloudProvider provider = new AzureCloudProvider(getTestParameter());
listDisplayNamesForProvider(provider);
}
Aggregations