use of com.sequenceiq.flow.api.model.FlowLogResponse in project cloudbreak by hortonworks.
the class SdxUpgradeValidationResultProviderTest method testIsValidShouldReturnFalseWhenTheFlowDoesNotContainsValidationInitState.
@Test
void testIsValidShouldReturnFalseWhenTheFlowDoesNotContainsValidationInitState() {
FlowLogResponse flowLogResponse = createLastFlowLog();
when(cloudbreakFlowService.getLastCloudbreakFlowChainId(sdxCluster)).thenReturn(flowLogResponse);
when(cloudbreakFlowService.getFlowLogsByFlowId(FLOW_ID)).thenReturn(createFlowLogsWithOutValidationInitState());
assertFalse(underTest.isValidationFailed(sdxCluster));
verify(cloudbreakFlowService).getLastCloudbreakFlowChainId(sdxCluster);
verify(cloudbreakFlowService).getFlowLogsByFlowId(FLOW_ID);
}
use of com.sequenceiq.flow.api.model.FlowLogResponse in project cloudbreak by hortonworks.
the class SdxUpgradeValidationResultProviderTest method testIsValidShouldReturnFalseWhenTheFlowDoesNotContainsFailedState.
@Test
void testIsValidShouldReturnFalseWhenTheFlowDoesNotContainsFailedState() {
FlowLogResponse flowLogResponse = createLastFlowLog();
when(cloudbreakFlowService.getLastCloudbreakFlowChainId(sdxCluster)).thenReturn(flowLogResponse);
when(cloudbreakFlowService.getFlowLogsByFlowId(FLOW_ID)).thenReturn(createFlowLogsWithOutFailedState());
assertFalse(underTest.isValidationFailed(sdxCluster));
verify(cloudbreakFlowService).getLastCloudbreakFlowChainId(sdxCluster);
verify(cloudbreakFlowService).getFlowLogsByFlowId(FLOW_ID);
}
use of com.sequenceiq.flow.api.model.FlowLogResponse in project cloudbreak by hortonworks.
the class SdxUpgradeValidationResultProviderTest method testIsValidShouldReturnTrue.
@Test
void testIsValidShouldReturnTrue() {
FlowLogResponse flowLogResponse = createLastFlowLog();
when(cloudbreakFlowService.getLastCloudbreakFlowChainId(sdxCluster)).thenReturn(flowLogResponse);
when(cloudbreakFlowService.getFlowLogsByFlowId(FLOW_ID)).thenReturn(createFlowLogsWithFailedValidation());
assertTrue(underTest.isValidationFailed(sdxCluster));
verify(cloudbreakFlowService).getLastCloudbreakFlowChainId(sdxCluster);
verify(cloudbreakFlowService).getFlowLogsByFlowId(FLOW_ID);
}
use of com.sequenceiq.flow.api.model.FlowLogResponse in project cloudbreak by hortonworks.
the class LoadBalancerPollerServiceTest method setupFailFlowLogResponse.
private FlowLogResponse setupFailFlowLogResponse() {
FlowLogResponse flowLogResponse = new FlowLogResponse();
flowLogResponse.setCurrentState(LOAD_BALANCER_UPDATE_FAILED_STATE);
return flowLogResponse;
}
use of com.sequenceiq.flow.api.model.FlowLogResponse in project cloudbreak by hortonworks.
the class FlowServiceTest method setup.
@Before
public void setup() {
when(flowLogConverter.convert(any())).thenReturn(new FlowLogResponse());
lenient().when(failHandledEvents.contains(FAIL_HANDLED_NEXT_EVENT)).thenReturn(true);
}
Aggregations