use of com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent in project cloudbreak by hortonworks.
the class StructuredEventToCDPVersionDetailsConverterTest method testConversionWithEmptyStructuredEvent.
@Test
public void testConversionWithEmptyStructuredEvent() {
StructuredFlowEvent structuredFlowEvent = new StructuredFlowEvent();
UsageProto.CDPVersionDetails flowVersionDetails = underTest.convert(structuredFlowEvent);
Assert.assertEquals("", flowVersionDetails.getCmVersion());
Assert.assertEquals("", flowVersionDetails.getCdpdVersion());
Assert.assertEquals("", flowVersionDetails.getCrVersion());
Assert.assertEquals("", flowVersionDetails.getOsPatchLevel());
Assert.assertEquals("", flowVersionDetails.getSaltVersion());
StructuredSyncEvent structuredSyncEvent = new StructuredSyncEvent();
UsageProto.CDPVersionDetails syncVersionDetails = underTest.convert(structuredSyncEvent);
Assert.assertEquals("", syncVersionDetails.getCmVersion());
Assert.assertEquals("", syncVersionDetails.getCdpdVersion());
Assert.assertEquals("", syncVersionDetails.getCrVersion());
Assert.assertEquals("", syncVersionDetails.getOsPatchLevel());
Assert.assertEquals("", syncVersionDetails.getSaltVersion());
}
use of com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent in project cloudbreak by hortonworks.
the class StructuredSyncEventToCDPDatahubSyncConverterTest method testConvertWithEmptyStructuredSyncEvent.
@Test
public void testConvertWithEmptyStructuredSyncEvent() {
StructuredSyncEvent structuredSyncEvent = new StructuredSyncEvent();
UsageProto.CDPDatahubSync datahubSync = underTest.convert(structuredSyncEvent);
Assertions.assertNotNull(datahubSync.getOperationDetails());
Assertions.assertNotNull(datahubSync.getSyncDetails());
Assertions.assertNotNull(datahubSync.getClusterDetails());
Assertions.assertNotNull(datahubSync.getStatusDetails());
}
use of com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent in project cloudbreak by hortonworks.
the class StructuredSyncEventToCDPDatalakeSyncConverterTest method testConvertWithEmptyStructuredSyncEvent.
@Test
public void testConvertWithEmptyStructuredSyncEvent() {
StructuredSyncEvent structuredSyncEvent = new StructuredSyncEvent();
UsageProto.CDPDatalakeSync datalakeSync = underTest.convert(structuredSyncEvent);
Assertions.assertNotNull(datalakeSync.getOperationDetails());
Assertions.assertNotNull(datalakeSync.getSyncDetails());
Assertions.assertNotNull(datalakeSync.getClusterDetails());
Assertions.assertNotNull(datalakeSync.getStatusDetails());
Assertions.assertNotNull(datalakeSync.getFeatures());
}
use of com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent in project cloudbreak by hortonworks.
the class StructuredSyncEventToCDPSyncDetailsConverterTest method testConversionWithNullOperation.
@Test
public void testConversionWithNullOperation() {
StructuredSyncEvent structuredSyncEvent = new StructuredSyncEvent();
UsageProto.CDPSyncDetails details = underTest.convert(structuredSyncEvent);
Assert.assertEquals(0, details.getClusterCreationStarted());
Assert.assertEquals(0, details.getClusterCreationFinished());
}
use of com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent in project cloudbreak by hortonworks.
the class StructuredSyncEventToCDPSyncDetailsConverterTest method testConversionWithEmptyClusterDetails.
@Test
public void testConversionWithEmptyClusterDetails() {
StructuredSyncEvent structuredSyncEvent = new StructuredSyncEvent();
ClusterDetails clusterDetails = new ClusterDetails();
structuredSyncEvent.setCluster(clusterDetails);
UsageProto.CDPSyncDetails details = underTest.convert(structuredSyncEvent);
Assert.assertEquals(0L, details.getClusterCreationStarted());
Assert.assertEquals(0L, details.getClusterCreationFinished());
}
Aggregations