Search in sources :

Example 31 with Features

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));
}
Also used : BaseDiagnosticsCollectionRequest(com.sequenceiq.common.api.diagnostics.BaseDiagnosticsCollectionRequest) FeatureSetting(com.sequenceiq.common.api.type.FeatureSetting) Features(com.sequenceiq.common.api.telemetry.model.Features) Telemetry(com.sequenceiq.common.api.telemetry.model.Telemetry) Test(org.junit.jupiter.api.Test)

Example 32 with Features

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"));
}
Also used : BaseDiagnosticsCollectionRequest(com.sequenceiq.common.api.diagnostics.BaseDiagnosticsCollectionRequest) FeatureSetting(com.sequenceiq.common.api.type.FeatureSetting) BadRequestException(com.sequenceiq.cloudbreak.common.exception.BadRequestException) Features(com.sequenceiq.common.api.telemetry.model.Features) Telemetry(com.sequenceiq.common.api.telemetry.model.Telemetry) Stack(com.sequenceiq.freeipa.entity.Stack) Test(org.junit.jupiter.api.Test)

Example 33 with Features

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;
}
Also used : Features(com.sequenceiq.common.api.telemetry.model.Features) Telemetry(com.sequenceiq.common.api.telemetry.model.Telemetry)

Aggregations

Features (com.sequenceiq.common.api.telemetry.model.Features)33 Test (org.junit.jupiter.api.Test)19 EnvironmentTelemetry (com.sequenceiq.environment.environment.dto.telemetry.EnvironmentTelemetry)16 Telemetry (com.sequenceiq.common.api.telemetry.model.Telemetry)10 TelemetryRequest (com.sequenceiq.common.api.telemetry.request.TelemetryRequest)10 AccountTelemetry (com.sequenceiq.environment.telemetry.domain.AccountTelemetry)10 ExperimentalFeatures (com.sequenceiq.environment.environment.domain.ExperimentalFeatures)8 EnvironmentFeatures (com.sequenceiq.environment.environment.dto.telemetry.EnvironmentFeatures)8 NetworkDto (com.sequenceiq.environment.network.dto.NetworkDto)8 FeaturesRequest (com.sequenceiq.common.api.telemetry.request.FeaturesRequest)7 EnvironmentRequest (com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentRequest)7 EnvironmentCreationDto (com.sequenceiq.environment.environment.dto.EnvironmentCreationDto)7 FreeIpaCreationDto (com.sequenceiq.environment.environment.dto.FreeIpaCreationDto)7 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)7 S3CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters)4 Logging (com.sequenceiq.common.api.telemetry.model.Logging)4 FeatureSetting (com.sequenceiq.common.api.type.FeatureSetting)4 EnvironmentBackup (com.sequenceiq.environment.environment.dto.EnvironmentBackup)4 BaseDiagnosticsCollectionRequest (com.sequenceiq.common.api.diagnostics.BaseDiagnosticsCollectionRequest)3 WorkloadAnalytics (com.sequenceiq.common.api.telemetry.model.WorkloadAnalytics)3