use of com.sequenceiq.common.api.telemetry.model.Telemetry in project cloudbreak by hortonworks.
the class DiagnosticsCollectionValidatorTest method testValidateWithCloudStorageWithEmptyTelemetry.
@Test
void testValidateWithCloudStorageWithEmptyTelemetry() {
BaseDiagnosticsCollectionRequest request = new BaseDiagnosticsCollectionRequest();
request.setDestination(DiagnosticsDestination.CLOUD_STORAGE);
Telemetry telemetry = new Telemetry();
BadRequestException thrown = assertThrows(BadRequestException.class, () -> underTest.validate(request, createStack(), telemetry));
assertTrue(thrown.getMessage().contains("Cloud storage logging is disabled for Data Hub"));
}
use of com.sequenceiq.common.api.telemetry.model.Telemetry in project cloudbreak by hortonworks.
the class DiagnosticsCollectionValidatorTest method testValidateWithSupportDestination.
@Test
void testValidateWithSupportDestination() {
BaseDiagnosticsCollectionRequest request = new BaseDiagnosticsCollectionRequest();
request.setDestination(DiagnosticsDestination.SUPPORT);
Telemetry telemetry = new Telemetry();
BadRequestException thrown = assertThrows(BadRequestException.class, () -> underTest.validate(request, createStack(), telemetry));
assertTrue(thrown.getMessage().contains("Destination SUPPORT is not supported yet."));
}
use of com.sequenceiq.common.api.telemetry.model.Telemetry in project cloudbreak by hortonworks.
the class DiagnosticsCollectionValidatorTest method testValidateWithInvalidEngDestination.
@Test
void testValidateWithInvalidEngDestination() {
BaseDiagnosticsCollectionRequest request = new BaseDiagnosticsCollectionRequest();
request.setDestination(DiagnosticsDestination.ENG);
Telemetry telemetry = new Telemetry();
BadRequestException thrown = assertThrows(BadRequestException.class, () -> underTest.validate(request, createStack(), telemetry));
assertTrue(thrown.getMessage().contains("Cluster log collection is not enabled for Data Hub"));
}
use of com.sequenceiq.common.api.telemetry.model.Telemetry in project cloudbreak by hortonworks.
the class DiiagnosticsCollectionValidatorTest method testValidateWithValidCloudStorage.
@Test
void testValidateWithValidCloudStorage() {
BaseDiagnosticsCollectionRequest request = new BaseDiagnosticsCollectionRequest();
request.setDestination(DiagnosticsDestination.CLOUD_STORAGE);
Telemetry telemetry = new Telemetry();
Logging logging = new Logging();
logging.setS3(new S3CloudStorageV1Parameters());
telemetry.setLogging(logging);
underTest.validate(request, createStackWithTelemetry(telemetry));
}
use of com.sequenceiq.common.api.telemetry.model.Telemetry in project cloudbreak by hortonworks.
the class DiiagnosticsCollectionValidatorTest method testValidateWithInvalidEngDestination.
@Test
void testValidateWithInvalidEngDestination() {
BaseDiagnosticsCollectionRequest request = new BaseDiagnosticsCollectionRequest();
request.setDestination(DiagnosticsDestination.ENG);
Telemetry telemetry = new Telemetry();
BadRequestException thrown = assertThrows(BadRequestException.class, () -> underTest.validate(request, createStackWithTelemetry(telemetry)));
assertTrue(thrown.getMessage().contains("Cluster log collection is not enabled for FreeIPA"));
}
Aggregations