Search in sources :

Example 1 with CloudInstanceLifeCycle

use of com.sequenceiq.cloudbreak.cloud.model.CloudInstanceLifeCycle in project cloudbreak by hortonworks.

the class AwsLifeCycleMapperTest method nullLifeCycle.

@Test
void nullLifeCycle() {
    Instance onDemandInstance = new Instance().withInstanceLifecycle((String) null);
    CloudInstanceLifeCycle lifeCycle = underTest.getLifeCycle(onDemandInstance);
    Assertions.assertThat(lifeCycle).isEqualTo(CloudInstanceLifeCycle.NORMAL);
}
Also used : Instance(com.amazonaws.services.ec2.model.Instance) CloudInstanceLifeCycle(com.sequenceiq.cloudbreak.cloud.model.CloudInstanceLifeCycle) Test(org.junit.jupiter.api.Test)

Example 2 with CloudInstanceLifeCycle

use of com.sequenceiq.cloudbreak.cloud.model.CloudInstanceLifeCycle in project cloudbreak by hortonworks.

the class AwsLifeCycleMapperTest method spotLifeCycle.

@Test
void spotLifeCycle() {
    Instance spotInstance = new Instance().withInstanceLifecycle(InstanceLifecycleType.Spot);
    CloudInstanceLifeCycle lifeCycle = underTest.getLifeCycle(spotInstance);
    Assertions.assertThat(lifeCycle).isEqualTo(CloudInstanceLifeCycle.SPOT);
}
Also used : Instance(com.amazonaws.services.ec2.model.Instance) CloudInstanceLifeCycle(com.sequenceiq.cloudbreak.cloud.model.CloudInstanceLifeCycle) Test(org.junit.jupiter.api.Test)

Example 3 with CloudInstanceLifeCycle

use of com.sequenceiq.cloudbreak.cloud.model.CloudInstanceLifeCycle in project cloudbreak by hortonworks.

the class AwsLifeCycleMapperTest method scheduledLifeCycle.

@Test
void scheduledLifeCycle() {
    Instance scheduledInstance = new Instance().withInstanceLifecycle(InstanceLifecycleType.Scheduled);
    CloudInstanceLifeCycle lifeCycle = underTest.getLifeCycle(scheduledInstance);
    Assertions.assertThat(lifeCycle).isEqualTo(CloudInstanceLifeCycle.NORMAL);
}
Also used : Instance(com.amazonaws.services.ec2.model.Instance) CloudInstanceLifeCycle(com.sequenceiq.cloudbreak.cloud.model.CloudInstanceLifeCycle) Test(org.junit.jupiter.api.Test)

Aggregations

Instance (com.amazonaws.services.ec2.model.Instance)3 CloudInstanceLifeCycle (com.sequenceiq.cloudbreak.cloud.model.CloudInstanceLifeCycle)3 Test (org.junit.jupiter.api.Test)3