Search in sources :

Example 1 with StackGresDistributedLogsReview

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;
}
Also used : StackGresDistributedLogsReview(io.stackgres.operator.common.StackGresDistributedLogsReview)

Example 2 with StackGresDistributedLogsReview

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.");
}
Also used : StackGresDistributedLogsReview(io.stackgres.operator.common.StackGresDistributedLogsReview) Test(org.junit.jupiter.api.Test)

Example 3 with StackGresDistributedLogsReview

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);
}
Also used : StackGresDistributedLogsReview(io.stackgres.operator.common.StackGresDistributedLogsReview) Test(org.junit.jupiter.api.Test)

Example 4 with StackGresDistributedLogsReview

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);
}
Also used : StackGresDistributedLogsReview(io.stackgres.operator.common.StackGresDistributedLogsReview) Test(org.junit.jupiter.api.Test)

Aggregations

StackGresDistributedLogsReview (io.stackgres.operator.common.StackGresDistributedLogsReview)4 Test (org.junit.jupiter.api.Test)3