use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.Status.NODE_FAILURE in project cloudbreak by hortonworks.
the class UpdateNodeCountValidatorTest method validateStackStatusDownscaleNodeFailureTargetedUpscaleNotSupported.
@Test
void validateStackStatusDownscaleNodeFailureTargetedUpscaleNotSupported() throws Exception {
when(targetedUpscaleSupportService.targetedUpscaleEntitlementsEnabled(any())).thenReturn(Boolean.FALSE);
Stack stack = new Stack();
stack.setName("stack");
stack.setStackStatus(new StackStatus(stack, DetailedStackStatus.NODE_FAILURE));
BadRequestException e = Assertions.assertThrows(BadRequestException.class, () -> underTest.validateStackStatus(stack, false));
assertEquals("Data Hub 'stack' is currently in 'NODE_FAILURE' state. Node count can only be updated if it's running.", e.getMessage());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.Status.NODE_FAILURE in project cloudbreak by hortonworks.
the class UpdateNodeCountValidatorTest method validateStackStatusUpscaleNodeFailureTargetedUpscaleNotSupported.
@Test
void validateStackStatusUpscaleNodeFailureTargetedUpscaleNotSupported() throws Exception {
when(targetedUpscaleSupportService.targetedUpscaleEntitlementsEnabled(any())).thenReturn(Boolean.FALSE);
Stack stack = new Stack();
stack.setName("stack");
stack.setStackStatus(new StackStatus(stack, DetailedStackStatus.NODE_FAILURE));
BadRequestException e = Assertions.assertThrows(BadRequestException.class, () -> underTest.validateStackStatus(stack, true));
assertEquals("Data Hub 'stack' is currently in 'NODE_FAILURE' state. Node count can only be updated if it's running.", e.getMessage());
}
Aggregations