Search in sources :

Example 1 with DiskTypes

use of com.sequenceiq.it.cloudbreak.newway.DiskTypes in project cloudbreak by hortonworks.

the class DiskTypeTests method testListOSDiskTypes.

@Test(priority = 17, groups = "disktypes")
public void testListOSDiskTypes() throws Exception {
    OpenstackCloudProvider provider = new OpenstackCloudProvider(getTestParameter());
    given(CloudbreakClient.isCreated());
    given(DiskTypes.request().withType(provider.getPlatform()), provider.getPlatform() + " disk types request");
    when(DiskTypes.getByType(), provider.getPlatform() + " disk types are requested.");
    then(DiskTypes.assertThis((disktype, t) -> {
        Collection<String> diskTypes = disktype.getByFilterResponses();
        diskTypes.forEach((diskType) -> LOGGER.debug(provider.getPlatform() + " Disk Type is ::: {}", diskType));
        Assert.assertFalse(diskTypes.isEmpty(), "Disk Type should be present in response!");
    }), provider.getPlatform() + " Disk Type should be part of the response.");
}
Also used : CloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.CloudProvider) TestParameter(com.sequenceiq.it.cloudbreak.newway.TestParameter) Logger(org.slf4j.Logger) CloudbreakClient(com.sequenceiq.it.cloudbreak.newway.CloudbreakClient) AwsCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AwsCloudProvider) Collection(java.util.Collection) LoggerFactory(org.slf4j.LoggerFactory) DiskTypes(com.sequenceiq.it.cloudbreak.newway.DiskTypes) Test(org.testng.annotations.Test) GcpCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.GcpCloudProvider) Objects(java.util.Objects) Assert(org.testng.Assert) AzureCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider) Map(java.util.Map) Entry(java.util.Map.Entry) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest) OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) Collection(java.util.Collection) OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) Test(org.testng.annotations.Test) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)

Example 2 with DiskTypes

use of com.sequenceiq.it.cloudbreak.newway.DiskTypes in project cloudbreak by hortonworks.

the class DiskTypeTests method testListAWSDiskTypes.

@Test(priority = 14, groups = "disktypes")
public void testListAWSDiskTypes() throws Exception {
    AwsCloudProvider provider = new AwsCloudProvider(getTestParameter());
    given(CloudbreakClient.isCreated());
    given(DiskTypes.request().withType(provider.getPlatform()), provider.getPlatform() + " disk types request");
    when(DiskTypes.getByType(), provider.getPlatform() + " disk types are requested.");
    then(DiskTypes.assertThis((disktype, t) -> {
        Collection<String> diskTypes = disktype.getByFilterResponses();
        diskTypes.forEach((diskType) -> LOGGER.debug(provider.getPlatform() + " Disk Type is ::: {}", diskType));
        Assert.assertFalse(diskTypes.isEmpty(), "Disk Type should be present in response!");
    }), provider.getPlatform() + " Disk Type should be part of the response.");
}
Also used : AwsCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AwsCloudProvider) CloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.CloudProvider) TestParameter(com.sequenceiq.it.cloudbreak.newway.TestParameter) Logger(org.slf4j.Logger) CloudbreakClient(com.sequenceiq.it.cloudbreak.newway.CloudbreakClient) AwsCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AwsCloudProvider) Collection(java.util.Collection) LoggerFactory(org.slf4j.LoggerFactory) DiskTypes(com.sequenceiq.it.cloudbreak.newway.DiskTypes) Test(org.testng.annotations.Test) GcpCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.GcpCloudProvider) Objects(java.util.Objects) Assert(org.testng.Assert) AzureCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider) Map(java.util.Map) Entry(java.util.Map.Entry) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest) OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) Collection(java.util.Collection) Test(org.testng.annotations.Test) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)

Example 3 with DiskTypes

use of com.sequenceiq.it.cloudbreak.newway.DiskTypes in project cloudbreak by hortonworks.

the class DiskTypeTests method testListGCPDiskTypes.

@Test(priority = 16, groups = "disktypes")
public void testListGCPDiskTypes() throws Exception {
    GcpCloudProvider provider = new GcpCloudProvider(getTestParameter());
    given(CloudbreakClient.isCreated());
    given(DiskTypes.request().withType(provider.getPlatform()), provider.getPlatform() + " disk types request");
    when(DiskTypes.getByType(), provider.getPlatform() + " disk types are requested.");
    then(DiskTypes.assertThis((disktype, t) -> {
        Collection<String> diskTypes = disktype.getByFilterResponses();
        diskTypes.forEach((diskType) -> LOGGER.debug(provider.getPlatform() + " Disk Type is ::: {}", diskType));
        Assert.assertFalse(diskTypes.isEmpty(), "Disk Type should be present in response!");
    }), provider.getPlatform() + " Disk Type should be part of the response.");
}
Also used : CloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.CloudProvider) TestParameter(com.sequenceiq.it.cloudbreak.newway.TestParameter) Logger(org.slf4j.Logger) CloudbreakClient(com.sequenceiq.it.cloudbreak.newway.CloudbreakClient) AwsCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AwsCloudProvider) Collection(java.util.Collection) LoggerFactory(org.slf4j.LoggerFactory) DiskTypes(com.sequenceiq.it.cloudbreak.newway.DiskTypes) Test(org.testng.annotations.Test) GcpCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.GcpCloudProvider) Objects(java.util.Objects) Assert(org.testng.Assert) AzureCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider) Map(java.util.Map) Entry(java.util.Map.Entry) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest) OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) GcpCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.GcpCloudProvider) Collection(java.util.Collection) Test(org.testng.annotations.Test) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)

Example 4 with DiskTypes

use of com.sequenceiq.it.cloudbreak.newway.DiskTypes in project cloudbreak by hortonworks.

the class DiskTypeTests method testListAzureDiskTypes.

@Test(priority = 15, groups = "disktypes")
public void testListAzureDiskTypes() throws Exception {
    AzureCloudProvider provider = new AzureCloudProvider(getTestParameter());
    given(CloudbreakClient.isCreated());
    given(DiskTypes.request().withType(provider.getPlatform()), provider.getPlatform() + " disk types request");
    when(DiskTypes.getByType(), provider.getPlatform() + " disk types are requested.");
    then(DiskTypes.assertThis((disktype, t) -> {
        Collection<String> diskTypes = disktype.getByFilterResponses();
        diskTypes.forEach((diskType) -> LOGGER.debug(provider.getPlatform() + " Disk Type is ::: {}", diskType));
        Assert.assertFalse(diskTypes.isEmpty(), "Disk Type should be present in response!");
    }), provider.getPlatform() + " Disk Type should be part of the response.");
}
Also used : CloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.CloudProvider) TestParameter(com.sequenceiq.it.cloudbreak.newway.TestParameter) Logger(org.slf4j.Logger) CloudbreakClient(com.sequenceiq.it.cloudbreak.newway.CloudbreakClient) AwsCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AwsCloudProvider) Collection(java.util.Collection) LoggerFactory(org.slf4j.LoggerFactory) DiskTypes(com.sequenceiq.it.cloudbreak.newway.DiskTypes) Test(org.testng.annotations.Test) GcpCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.GcpCloudProvider) Objects(java.util.Objects) Assert(org.testng.Assert) AzureCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider) Map(java.util.Map) Entry(java.util.Map.Entry) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest) OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) AzureCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider) Collection(java.util.Collection) Test(org.testng.annotations.Test) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)

Aggregations

CloudbreakClient (com.sequenceiq.it.cloudbreak.newway.CloudbreakClient)4 CloudbreakTest (com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)4 DiskTypes (com.sequenceiq.it.cloudbreak.newway.DiskTypes)4 TestParameter (com.sequenceiq.it.cloudbreak.newway.TestParameter)4 AwsCloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.AwsCloudProvider)4 AzureCloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider)4 CloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.CloudProvider)4 GcpCloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.GcpCloudProvider)4 OpenstackCloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider)4 Collection (java.util.Collection)4 Map (java.util.Map)4 Entry (java.util.Map.Entry)4 Objects (java.util.Objects)4 Logger (org.slf4j.Logger)4 LoggerFactory (org.slf4j.LoggerFactory)4 Assert (org.testng.Assert)4 Test (org.testng.annotations.Test)4