use of net.ripe.rpki.validator3.domain.ValidationRun.Status.SUCCEEDED in project rpki-validator-3 by RIPE-NCC.
the class CertificateTreeValidationServiceTest method should_register_rsync_repositories.
@Test
public void should_register_rsync_repositories() {
TrustAnchor ta = factory.createTrustAnchor(x -> {
x.notifyURI(null);
x.repositoryURI(TA_CA_REPOSITORY_URI);
});
trustAnchors.add(ta);
subject.validate(ta.getId());
entityManager.flush();
List<CertificateTreeValidationRun> completed = validationRuns.findAll(CertificateTreeValidationRun.class);
assertThat(completed).hasSize(1);
CertificateTreeValidationRun result = completed.get(0);
assertThat(result.getStatus()).isEqualTo(SUCCEEDED);
assertThat(rpkiRepositories.findAll(null, null)).first().extracting(RpkiRepository::getStatus, RpkiRepository::getLocationUri).containsExactly(RpkiRepository.Status.PENDING, TA_CA_REPOSITORY_URI);
assertThat(ta.isInitialCertificateTreeValidationRunCompleted()).as("trust anchor initial validation run completed").isFalse();
assertThat(settings.isInitialValidationRunCompleted()).as("validator initial validation run completed").isFalse();
}
use of net.ripe.rpki.validator3.domain.ValidationRun.Status.SUCCEEDED in project rpki-validator-3 by RIPE-NCC.
the class CertificateTreeValidationServiceTest method should_register_rpki_repositories.
@Test
public void should_register_rpki_repositories() {
TrustAnchor ta = factory.createRipeNccTrustAnchor();
trustAnchors.add(ta);
subject.validate(ta.getId());
entityManager.flush();
List<CertificateTreeValidationRun> completed = validationRuns.findAll(CertificateTreeValidationRun.class);
assertThat(completed).hasSize(1);
CertificateTreeValidationRun result = completed.get(0);
assertThat(result.getStatus()).isEqualTo(SUCCEEDED);
assertThat(rpkiRepositories.findAll(null, null)).first().extracting(RpkiRepository::getStatus, RpkiRepository::getLocationUri).containsExactly(RpkiRepository.Status.PENDING, "https://rrdp.ripe.net/notification.xml");
assertThat(ta.isInitialCertificateTreeValidationRunCompleted()).as("trust anchor initial validation run completed").isFalse();
assertThat(settings.isInitialValidationRunCompleted()).as("validator initial validation run completed").isFalse();
}
use of net.ripe.rpki.validator3.domain.ValidationRun.Status.SUCCEEDED in project rpki-validator-3 by RIPE-NCC.
the class CertificateTreeValidationServiceTest method should_validate_minimal_trust_anchor.
@Test
@Ignore("Fix it --- if fails if TrustAnchorControllerTest is not run before it")
public void should_validate_minimal_trust_anchor() {
TrustAnchor ta = factory.createTrustAnchor(x -> {
});
trustAnchors.add(ta);
RpkiRepository repository = rpkiRepositories.register(ta, TA_RRDP_NOTIFY_URI, RpkiRepository.Type.RRDP);
repository.setDownloaded();
entityManager.flush();
subject.validate(ta.getId());
entityManager.flush();
List<CertificateTreeValidationRun> completed = validationRuns.findAll(CertificateTreeValidationRun.class);
assertThat(completed).hasSize(1);
CertificateTreeValidationRun result = completed.get(0);
assertThat(result.getValidationChecks()).isEmpty();
assertThat(result.getStatus()).isEqualTo(SUCCEEDED);
assertThat(result.getValidatedObjects()).extracting((x) -> x.getLocations().first()).containsExactlyInAnyOrder("rsync://rpki.test/test-trust-anchor.mft", "rsync://rpki.test/test-trust-anchor.crl");
assertThat(ta.isInitialCertificateTreeValidationRunCompleted()).as("trust anchor initial validation run completed").isTrue();
assertThat(settings.isInitialValidationRunCompleted()).as("validator initial validation run completed").isFalse();
}
Aggregations