Search in sources :

Example 6 with StructuredSyncEvent

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());
}
Also used : StructuredSyncEvent(com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent) StructuredFlowEvent(com.sequenceiq.cloudbreak.structuredevent.event.StructuredFlowEvent) UsageProto(com.cloudera.thunderhead.service.common.usage.UsageProto) Test(org.junit.jupiter.api.Test)

Example 7 with StructuredSyncEvent

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());
}
Also used : StructuredSyncEvent(com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent) UsageProto(com.cloudera.thunderhead.service.common.usage.UsageProto) Test(org.junit.jupiter.api.Test)

Example 8 with StructuredSyncEvent

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());
}
Also used : StructuredSyncEvent(com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent) UsageProto(com.cloudera.thunderhead.service.common.usage.UsageProto) Test(org.junit.jupiter.api.Test)

Example 9 with StructuredSyncEvent

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());
}
Also used : StructuredSyncEvent(com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent) UsageProto(com.cloudera.thunderhead.service.common.usage.UsageProto) Test(org.junit.jupiter.api.Test)

Example 10 with StructuredSyncEvent

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());
}
Also used : ClusterDetails(com.sequenceiq.cloudbreak.structuredevent.event.ClusterDetails) StructuredSyncEvent(com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent) UsageProto(com.cloudera.thunderhead.service.common.usage.UsageProto) Test(org.junit.jupiter.api.Test)

Aggregations

StructuredSyncEvent (com.sequenceiq.cloudbreak.structuredevent.event.StructuredSyncEvent)32 Test (org.junit.jupiter.api.Test)30 UsageProto (com.cloudera.thunderhead.service.common.usage.UsageProto)28 StructuredFlowEvent (com.sequenceiq.cloudbreak.structuredevent.event.StructuredFlowEvent)22 StackDetails (com.sequenceiq.cloudbreak.structuredevent.event.StackDetails)10 BlueprintDetails (com.sequenceiq.cloudbreak.structuredevent.event.BlueprintDetails)5 ClusterDetails (com.sequenceiq.cloudbreak.structuredevent.event.ClusterDetails)4 Stack (com.sequenceiq.cloudbreak.domain.stack.Stack)3 Json (com.sequenceiq.cloudbreak.common.json.Json)2 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)2 InstanceGroupDetails (com.sequenceiq.cloudbreak.structuredevent.event.InstanceGroupDetails)2 OperationDetails (com.sequenceiq.cloudbreak.structuredevent.event.legacy.OperationDetails)2 DetailedStackStatus (com.sequenceiq.cloudbreak.api.endpoint.v4.common.DetailedStackStatus)1 StackTags (com.sequenceiq.cloudbreak.cloud.model.StackTags)1 NotFoundException (com.sequenceiq.cloudbreak.common.exception.NotFoundException)1 Blueprint (com.sequenceiq.cloudbreak.domain.Blueprint)1 StackStatus (com.sequenceiq.cloudbreak.domain.stack.StackStatus)1 HashMap (java.util.HashMap)1 JobExecutionException (org.quartz.JobExecutionException)1