串行验证通过
This commit is contained in:
37
tests/test_apnic_tree_live_m15.rs
Normal file
37
tests/test_apnic_tree_live_m15.rs
Normal file
@@ -0,0 +1,37 @@
|
||||
use rpki::fetch::http::{BlockingHttpFetcher, HttpFetcherConfig};
|
||||
use rpki::fetch::rsync_system::{SystemRsyncConfig, SystemRsyncFetcher};
|
||||
use rpki::policy::Policy;
|
||||
use rpki::storage::RocksStore;
|
||||
use rpki::validation::run_tree_from_tal::run_tree_from_tal_url_serial;
|
||||
use rpki::validation::tree::TreeRunConfig;
|
||||
|
||||
const APNIC_TAL_URL: &str = "https://tal.apnic.net/tal-archive/apnic-rfc7730-https.tal";
|
||||
|
||||
#[test]
|
||||
#[ignore = "live network + rsync smoke test (APNIC TAL)"]
|
||||
fn apnic_tree_depth1_processes_more_than_root() {
|
||||
let http = BlockingHttpFetcher::new(HttpFetcherConfig::default()).expect("http fetcher");
|
||||
let rsync = SystemRsyncFetcher::new(SystemRsyncConfig::default());
|
||||
|
||||
let temp = tempfile::tempdir().expect("tempdir");
|
||||
let store = RocksStore::open(temp.path()).expect("open rocksdb");
|
||||
let policy = Policy::default();
|
||||
let out = run_tree_from_tal_url_serial(
|
||||
&store,
|
||||
&policy,
|
||||
APNIC_TAL_URL,
|
||||
&http,
|
||||
&rsync,
|
||||
time::OffsetDateTime::now_utc(),
|
||||
&TreeRunConfig {
|
||||
max_depth: Some(1),
|
||||
max_instances: Some(2),
|
||||
},
|
||||
)
|
||||
.expect("run tree from tal");
|
||||
|
||||
assert!(
|
||||
out.tree.instances_processed >= 2,
|
||||
"expected to process root + at least one child"
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user