将fetch pp cache改成使用vcir结构,跑通apnic全量同步

This commit is contained in:
2026-03-13 14:45:41 +08:00
parent e3339533b8
commit cf764c35bb
53 changed files with 8931 additions and 2201 deletions

View File

@@ -1,6 +1,6 @@
use std::path::Path;
use rpki::storage::{FetchCachePpKey, RocksStore};
use rpki::storage::RocksStore;
#[test]
fn storage_opens_and_creates_column_families() {
@@ -24,26 +24,6 @@ fn raw_objects_roundtrip_by_rsync_uri() {
assert!(got.is_none());
}
#[test]
fn fetch_cache_pp_roundtrip_by_manifest_uri() {
let dir = tempfile::tempdir().expect("tempdir");
let store = RocksStore::open(dir.path()).expect("open rocksdb");
let manifest_uri = "rsync://example.invalid/repo/manifest.mft";
let key = FetchCachePpKey::from_manifest_rsync_uri(manifest_uri);
assert_eq!(
key.as_str(),
"fetch_cache_pp:rsync://example.invalid/repo/manifest.mft"
);
let bytes = b"pack";
store
.put_fetch_cache_pp(&key, bytes)
.expect("put fetch_cache_pp");
let got = store.get_fetch_cache_pp(&key).expect("get fetch_cache_pp");
assert_eq!(got.as_deref(), Some(bytes.as_slice()));
}
#[test]
fn rrdp_state_roundtrip_by_notification_uri() {
let dir = tempfile::tempdir().expect("tempdir");