use of io.stackgres.common.crd.sgbackup.StackGresBackupList in project stackgres by ongres.
the class RestoreConfigValidatorTest method givenAValidCreation_shouldPass.
@Test
void givenAValidCreation_shouldPass() throws ValidationFailed {
final StackGresClusterReview review = getCreationReview();
review.getRequest().getObject().getSpec().getPostgres().setVersion(firstPgMajorVersion);
StackGresBackupList backupList = JsonUtil.readFromJson("backup/list.json", StackGresBackupList.class);
backupList.getItems().get(0).getStatus().getBackupInformation().setPostgresVersion(firstPgMajorVersionNumber);
when(scanner.findResources()).thenReturn(Optional.of(backupList.getItems()));
validator.validate(review);
verify(scanner).findResources();
}
Aggregations