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);
}
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);
}
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);
}
Aggregations