use of com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent in project cloudbreak by hortonworks.
the class StructuredEventToCDPStatusDetailsConverterTest method testConversionFilledOutValues.
@Test
public void testConversionFilledOutValues() {
StructuredFlowEvent structuredFlowEvent = new StructuredFlowEvent();
structuredFlowEvent.setStack(createStackDetails());
structuredFlowEvent.setCluster(createClusterDetails());
UsageProto.CDPStatusDetails flowStatusDetails = underTest.convert(structuredFlowEvent);
Assert.assertEquals("AVAILABLE", flowStatusDetails.getStackStatus());
Assert.assertEquals("AVAILABLE", flowStatusDetails.getStackDetailedStatus());
Assert.assertEquals("statusreason", flowStatusDetails.getStackStatusReason());
Assert.assertEquals("AVAILABLE", flowStatusDetails.getClusterStatus());
Assert.assertEquals("statusreason", flowStatusDetails.getClusterStatusReason());
StructuredSyncEvent structuredSyncEvent = new StructuredSyncEvent();
structuredSyncEvent.setStack(createStackDetails());
structuredSyncEvent.setCluster(createClusterDetails());
UsageProto.CDPStatusDetails syncStatusDetails = underTest.convert(structuredSyncEvent);
Assert.assertEquals("AVAILABLE", syncStatusDetails.getStackStatus());
Assert.assertEquals("AVAILABLE", syncStatusDetails.getStackDetailedStatus());
Assert.assertEquals("statusreason", syncStatusDetails.getStackStatusReason());
Assert.assertEquals("AVAILABLE", syncStatusDetails.getClusterStatus());
Assert.assertEquals("statusreason", syncStatusDetails.getClusterStatusReason());
}
use of com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent in project cloudbreak by hortonworks.
the class StructuredSyncEventToCDPSyncDetailsConverterTest method testConversionWithEmptyStackDetails.
@Test
public void testConversionWithEmptyStackDetails() {
StructuredSyncEvent structuredSyncEvent = new StructuredSyncEvent();
StackDetails stackDetails = new StackDetails();
structuredSyncEvent.setStack(stackDetails);
UsageProto.CDPSyncDetails details = underTest.convert(structuredSyncEvent);
Assert.assertEquals("UNKNOWN", details.getDatabaseType());
}
Aggregations