use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsPgbenchConstraintValidatorTest method invalidLowConcurrentClients_shouldFail.
@Test
void invalidLowConcurrentClients_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().getBenchmark().getPgbench().setConcurrentClients(0);
checkErrorCause(StackGresDbOpsPgbench.class, "spec.benchmark.pgbench.concurrentClients", review, Min.class);
}
use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsPgbenchConstraintValidatorTest method nullBenchmarkType_shouldFail.
@Test
void nullBenchmarkType_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().getBenchmark().setType(null);
checkErrorCause(StackGresDbOpsBenchmark.class, "spec.benchmark.type", review, NotNull.class);
}
use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsPgbenchConstraintValidatorTest method invalidLowThreads_shouldFail.
@Test
void invalidLowThreads_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().getBenchmark().getPgbench().setThreads(0);
checkErrorCause(StackGresDbOpsPgbench.class, "spec.benchmark.pgbench.threads", review, Min.class);
}
use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsRepackConstraintValidatorTest method wrongWaitTimeout_shouldFail.
@Test
void wrongWaitTimeout_shouldFail() {
StackGresDbOpsReview review = getValidReview();
review.getRequest().getObject().getSpec().getRepack().setWaitTimeout("10s");
checkErrorCause(StackGresDbOpsRepack.class, "spec.repack.waitTimeout", "spec.repack.isWaitTimeoutValid", review, AssertTrue.class);
}
use of io.stackgres.operator.common.StackGresDbOpsReview in project stackgres by ongres.
the class DbOpsRepackConstraintValidatorTest method getInvalidReview.
@Override
protected StackGresDbOpsReview getInvalidReview() {
final StackGresDbOpsReview review = JsonUtil.readFromJson("dbops_allow_requests/valid_repack_creation.json", StackGresDbOpsReview.class);
review.getRequest().getObject().setSpec(null);
return review;
}
Aggregations