use of io.stackgres.operator.common.PgConfigReview in project stackgres by ongres.
the class BlocklistValidatorTest method givenConfigurationDeletion_shouldNotFail.
@Test
void givenConfigurationDeletion_shouldNotFail() throws ValidationFailed {
PgConfigReview review = JsonUtil.readFromJson("pgconfig_allow_request/pgconfig_delete.json", PgConfigReview.class);
validator.validate(review);
}
use of io.stackgres.operator.common.PgConfigReview in project stackgres by ongres.
the class BlocklistValidatorTest method givenValidConfigurationCreation_shouldNotFail.
@Test
void givenValidConfigurationCreation_shouldNotFail() throws ValidationFailed {
PgConfigReview review = JsonUtil.readFromJson("pgconfig_allow_request/valid_pgconfig.json", PgConfigReview.class);
validator.validate(review);
}
use of io.stackgres.operator.common.PgConfigReview in project stackgres by ongres.
the class PgConfigConstraintValidatorTest method emptyPosgrestConf_shouldFail.
@Test
void emptyPosgrestConf_shouldFail() {
PgConfigReview review = getValidReview();
review.getRequest().getObject().getSpec().setPostgresqlConf(new HashMap<>());
checkNotEmptyErrorCause(StackGresPostgresConfigSpec.class, "spec.postgresqlConf", review);
}
use of io.stackgres.operator.common.PgConfigReview in project stackgres by ongres.
the class PgConfigConstraintValidatorTest method nullSpec_shouldFail.
@Test
void nullSpec_shouldFail() {
PgConfigReview review = getInvalidReview();
checkNotNullErrorCause(StackGresPostgresConfig.class, "spec", review);
}
use of io.stackgres.operator.common.PgConfigReview in project stackgres by ongres.
the class PgConfigValidationPipelineTest method getConstraintViolatingReview.
@Override
public PgConfigReview getConstraintViolatingReview() {
PgConfigReview review = getValidReview();
review.getRequest().getObject().getSpec().setPostgresqlConf(new HashMap<>());
return review;
}
Aggregations