use of com.sequenceiq.cloudbreak.telemetry.TelemetryConfiguration in project cloudbreak by hortonworks.
the class TelemetryConverterTest method testConvertFromEnvAndSdxResponseWithWADisabledGlobally.
@Test
public void testConvertFromEnvAndSdxResponseWithWADisabledGlobally() {
// GIVEN
TelemetryResponse response = new TelemetryResponse();
SdxClusterResponse sdxClusterResponse = new SdxClusterResponse();
sdxClusterResponse.setCrn("crn:cdp:cloudbreak:us-west-1:someone:sdxcluster:sdxId");
sdxClusterResponse.setName("sdxName");
AltusDatabusConfiguration altusDatabusConfiguration = new AltusDatabusConfiguration(DATABUS_ENDPOINT, DATABUS_S3_BUCKET, false, "", null);
MeteringConfiguration meteringConfiguration = new MeteringConfiguration(true, null, null);
ClusterLogsCollectionConfiguration logCollectionConfig = new ClusterLogsCollectionConfiguration(true, null, null);
MonitoringConfiguration monitoringConfig = new MonitoringConfiguration();
monitoringConfig.setEnabled(true);
TelemetryConfiguration telemetryConfiguration = new TelemetryConfiguration(altusDatabusConfiguration, meteringConfiguration, logCollectionConfig, monitoringConfig, null);
TelemetryConverter converter = new TelemetryConverter(telemetryConfiguration, false, true);
// WHEN
TelemetryRequest result = converter.convert(response, sdxClusterResponse);
// THEN
assertNull(result.getWorkloadAnalytics());
}
Aggregations