use of io.stackgres.operator.common.StackGresDistributedLogsReview in project stackgres by ongres.
the class DistributedLogsValidationPipelineTest method getConstraintViolatingReview.
@Override
public StackGresDistributedLogsReview getConstraintViolatingReview() {
StackGresDistributedLogsReview review = getValidReview();
review.getRequest().getObject().getSpec().getPersistentVolume().setSize(null);
return review;
}
use of io.stackgres.operator.common.StackGresDistributedLogsReview in project stackgres by ongres.
the class ExtensionsValidatorTest method givenACreationWithMissingExtensions_shouldFail.
@Test
void givenACreationWithMissingExtensions_shouldFail() {
final StackGresDistributedLogsReview review = getCreationReview();
ValidationUtils.assertValidationFailed(() -> validator.validate(review), ErrorType.MISSING_EXTENSION, "Extensions dblink, pg_stat_statements, plpgsql, plpython3u are missing.");
}
use of io.stackgres.operator.common.StackGresDistributedLogsReview in project stackgres by ongres.
the class ExtensionsValidatorTest method givenAValidCreation_shouldPass.
@Test
void givenAValidCreation_shouldPass() throws ValidationFailed {
final StackGresDistributedLogsReview review = getCreationReview();
review.getRequest().getObject().getSpec().setToInstallPostgresExtensions(new ArrayList<>());
review.getRequest().getObject().getSpec().getToInstallPostgresExtensions().addAll(defaultExtensions);
validator.validate(review);
}
use of io.stackgres.operator.common.StackGresDistributedLogsReview in project stackgres by ongres.
the class ExtensionsValidatorTest method givenAnUpdate_shouldPass.
@Test
void givenAnUpdate_shouldPass() throws ValidationFailed {
final StackGresDistributedLogsReview review = getUpdateReview();
review.getRequest().getObject().getSpec().setToInstallPostgresExtensions(new ArrayList<>());
review.getRequest().getObject().getSpec().getToInstallPostgresExtensions().addAll(defaultExtensions);
validator.validate(review);
}
Aggregations