use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsConstraintValidatorTest method nullOp_shouldFail.
@Test
void nullOp_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().setOp(null);
checkErrorCause(StackGresDbOpsSpec.class, "spec.op", review, NotNull.class);
}
use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsConstraintValidatorTest method invalidLowMaxRetries_shouldFail.
@Test
void invalidLowMaxRetries_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().setMaxRetries(-1);
checkErrorCause(StackGresDbOpsSpec.class, "spec.maxRetries", review, Min.class);
}
use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsConstraintValidatorTest method invalidHighMaxRetries_shouldFail.
@Test
void invalidHighMaxRetries_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().setMaxRetries(11);
checkErrorCause(StackGresDbOpsSpec.class, "spec.maxRetries", review, Max.class);
}
use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsPgbenchConstraintValidatorTest method nullBenchmarkPgbenchDatabaseSize_shouldFail.
@Test
void nullBenchmarkPgbenchDatabaseSize_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().getBenchmark().getPgbench().setDatabaseSize(null);
checkErrorCause(StackGresDbOpsPgbench.class, "spec.benchmark.pgbench.databaseSize", review, NotNull.class);
}
use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsPgbenchConstraintValidatorTest method negativeDuration_shouldFail.
@Test
void negativeDuration_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().getBenchmark().getPgbench().setDuration("-PT1M");
checkErrorCause(StackGresDbOpsPgbench.class, "spec.benchmark.pgbench.duration", "spec.benchmark.pgbench.isDurationValid", review, AssertTrue.class);
}
Aggregations