use of com.sequenceiq.common.api.telemetry.model.Features in project cloudbreak by hortonworks.
the class DiiagnosticsCollectionValidatorTest method testValidateWithValidEngDestination.
@Test
void testValidateWithValidEngDestination() {
BaseDiagnosticsCollectionRequest request = new BaseDiagnosticsCollectionRequest();
request.setDestination(DiagnosticsDestination.ENG);
Telemetry telemetry = new Telemetry();
Features features = new Features();
FeatureSetting clusterLogsCollection = new FeatureSetting();
clusterLogsCollection.setEnabled(true);
features.setClusterLogsCollection(clusterLogsCollection);
telemetry.setFeatures(features);
underTest.validate(request, createStackWithTelemetry(telemetry));
}
use of com.sequenceiq.common.api.telemetry.model.Features in project cloudbreak by hortonworks.
the class DiiagnosticsCollectionValidatorTest method testValidateWithValidEngDestinationButWithWrongVersion.
@Test
void testValidateWithValidEngDestinationButWithWrongVersion() {
BaseDiagnosticsCollectionRequest request = new BaseDiagnosticsCollectionRequest();
request.setDestination(DiagnosticsDestination.ENG);
Telemetry telemetry = new Telemetry();
Features features = new Features();
FeatureSetting clusterLogsCollection = new FeatureSetting();
clusterLogsCollection.setEnabled(true);
features.setClusterLogsCollection(clusterLogsCollection);
telemetry.setFeatures(features);
Stack stack = createStackWithTelemetry(telemetry);
stack.setAppVersion("2.32.0-b48");
BadRequestException thrown = assertThrows(BadRequestException.class, () -> underTest.validate(request, stack));
assertTrue(thrown.getMessage().contains("Required FreeIPA min major/minor version is 2.33"));
}
use of com.sequenceiq.common.api.telemetry.model.Features in project cloudbreak by hortonworks.
the class ClusterMonitoringEngineTest method createTelemetry.
private Telemetry createTelemetry() {
Telemetry telemetry = new Telemetry();
Features features = new Features();
features.addMonitoring(true);
telemetry.setFeatures(features);
return telemetry;
}
Aggregations