use of com.sequenceiq.cloudbreak.datalakedr.model.DatalakeBackupStatusResponse in project cloudbreak by hortonworks.
the class GrpcStatusResponseToDatalakeBackupStatusResponseConverterTest method testSuccessfulBackup.
@Test
public void testSuccessfulBackup() {
datalakeDRProto.BackupDatalakeStatusResponse.Builder builder = datalakeDRProto.BackupDatalakeStatusResponse.newBuilder().setOverallState("SUCCESSFUL");
DatalakeBackupStatusResponse response = underTest.convert(builder.build());
assertEquals(DatalakeBackupStatusResponse.State.SUCCESSFUL, response.getState());
assertEquals(DatalakeBackupStatusResponse.NO_FAILURES, response.getFailureReason());
assert response.isComplete();
}
use of com.sequenceiq.cloudbreak.datalakedr.model.DatalakeBackupStatusResponse in project cloudbreak by hortonworks.
the class GrpcStatusResponseToDatalakeBackupStatusResponseConverterTest method testFailedBackup.
@Test
public void testFailedBackup() {
datalakeDRProto.BackupDatalakeStatusResponse.Builder builder = datalakeDRProto.BackupDatalakeStatusResponse.newBuilder().setOverallState("FAILED").setFailureReason(FAILURE_REASON);
DatalakeBackupStatusResponse response = underTest.convert(builder.build());
assertEquals(DatalakeBackupStatusResponse.State.FAILED, response.getState());
assertEquals(FAILURE_REASON, response.getFailureReason());
assert response.isComplete();
}
Aggregations