20260427 拆分独立repo-bytes.db数据库文件,cir materialize 移除旧兼容
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
|
||||
use rpki::blob_store::ExternalRepoBytesDb;
|
||||
use rpki::ccr::{
|
||||
CcrContentInfo, CcrDigestAlgorithm, RpkiCanonicalCacheRepresentation, TrustAnchorState,
|
||||
encode_content_info,
|
||||
@@ -15,7 +16,7 @@ fn cir_drop_report_counts_dropped_roa_objects_and_vrps() {
|
||||
let cir_path = td.path().join("input.cir");
|
||||
let ccr_path = td.path().join("output.ccr");
|
||||
let report_path = td.path().join("report.json");
|
||||
let static_root = td.path().join("static");
|
||||
let repo_bytes_db = td.path().join("repo-bytes.db");
|
||||
let json_out = td.path().join("drop.json");
|
||||
let md_out = td.path().join("drop.md");
|
||||
|
||||
@@ -26,12 +27,10 @@ fn cir_drop_report_counts_dropped_roa_objects_and_vrps() {
|
||||
use sha2::{Digest, Sha256};
|
||||
hex::encode(Sha256::digest(&roa_bytes))
|
||||
};
|
||||
let dir = static_root
|
||||
.join("20260409")
|
||||
.join(&hash[0..2])
|
||||
.join(&hash[2..4]);
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
std::fs::write(dir.join(&hash), &roa_bytes).unwrap();
|
||||
ExternalRepoBytesDb::open(&repo_bytes_db)
|
||||
.expect("open repo bytes")
|
||||
.put_blob_bytes_batch(&[(hash.clone(), roa_bytes.clone())])
|
||||
.expect("write repo bytes");
|
||||
|
||||
let cir = CanonicalInputRepresentation {
|
||||
version: CIR_VERSION_V1,
|
||||
@@ -96,8 +95,8 @@ fn cir_drop_report_counts_dropped_roa_objects_and_vrps() {
|
||||
ccr_path.to_string_lossy().as_ref(),
|
||||
"--report-json",
|
||||
report_path.to_string_lossy().as_ref(),
|
||||
"--static-root",
|
||||
static_root.to_string_lossy().as_ref(),
|
||||
"--repo-bytes-db",
|
||||
repo_bytes_db.to_string_lossy().as_ref(),
|
||||
"--json-out",
|
||||
json_out.to_string_lossy().as_ref(),
|
||||
"--md-out",
|
||||
|
||||
Reference in New Issue
Block a user