use of com.sequenceiq.environment.environment.dto.telemetry.S3CloudStorageParameters in project cloudbreak by hortonworks.
the class EnvironmentBackupStorageLocationValidatorTest method validateBackupStorageLocationNoStorageLocation.
@Test
public void validateBackupStorageLocationNoStorageLocation() {
when(environment.getBackup()).thenReturn(backup);
when(backup.getS3()).thenReturn(new S3CloudStorageParameters());
when(backup.getStorageLocation()).thenReturn(null);
ValidationResult result = underTest.validateBackupStorageLocation(environment);
assertFalse(result.hasError());
}
use of com.sequenceiq.environment.environment.dto.telemetry.S3CloudStorageParameters in project cloudbreak by hortonworks.
the class EnvironmentBackupStorageLocationValidatorTest method validateBackupStorageLocationValidatorPasses.
@Test
public void validateBackupStorageLocationValidatorPasses() {
when(environment.getBackup()).thenReturn(backup);
when(backup.getS3()).thenReturn(new S3CloudStorageParameters());
when(backup.getStorageLocation()).thenReturn(REGION_1);
ValidationResult result = underTest.validateBackupStorageLocation(environment);
assertFalse(result.hasError());
}
use of com.sequenceiq.environment.environment.dto.telemetry.S3CloudStorageParameters in project cloudbreak by hortonworks.
the class EnvironmentLogStorageConfigurationValidatorTest method validateTelemetryStorageConfigS3WhenConfigValidationFailed.
@Test
public void validateTelemetryStorageConfigS3WhenConfigValidationFailed() {
when(environment.getCloudPlatform()).thenReturn(CloudConstants.AWS);
when(environment.getTelemetry()).thenReturn(telemetry);
when(telemetry.getLogging()).thenReturn(logging);
S3CloudStorageParameters s3 = new S3CloudStorageParameters();
s3.setInstanceProfile("arn:aws:iam::1234567:instance1-profile/test");
when(logging.getS3()).thenReturn(s3);
ValidationResult result = underTest.validateTelemetryLoggingStorageConfiguration(environment);
assertTrue(result.hasError());
}
Aggregations