20260616 增加产品UI查询服务
This commit is contained in:
@@ -1452,6 +1452,14 @@ fn synthetic_post_validation_shared() -> PostValidationShared {
|
||||
let mut pp1 = crate::audit::PublicationPointAudit::default();
|
||||
pp1.source = "fresh".to_string();
|
||||
pp1.rrdp_notification_uri = Some("https://example.test/n1.xml".to_string());
|
||||
pp1.manifest_rsync_uri = "rsync://example.test/repo/pp1/manifest.mft".to_string();
|
||||
pp1.objects.push(crate::audit::ObjectAuditEntry {
|
||||
rsync_uri: "rsync://example.test/repo/pp1/a.roa".to_string(),
|
||||
sha256_hex: "11".repeat(32),
|
||||
kind: crate::audit::AuditObjectKind::Roa,
|
||||
result: crate::audit::AuditObjectResult::Ok,
|
||||
detail: None,
|
||||
});
|
||||
let mut pp2 = crate::audit::PublicationPointAudit::default();
|
||||
pp2.source = "fresh".to_string();
|
||||
pp2.rrdp_notification_uri = Some("https://example.test/n1.xml".to_string());
|
||||
@@ -1549,6 +1557,19 @@ fn run_report_task_and_stage_timing_work() {
|
||||
serde_json::from_str(&report_json).expect("parse compact report json");
|
||||
assert_eq!(report["vrps"].as_array().unwrap().len(), 2);
|
||||
assert_eq!(report["aspas"].as_array().unwrap().len(), 1);
|
||||
assert_eq!(report["queryAudit"]["status"].as_str(), Some("complete"));
|
||||
assert!(report["queryAudit"]["eventsCount"].as_u64().unwrap() > 0);
|
||||
let events_path = dir.path().join(
|
||||
report["queryAudit"]["eventsPath"]
|
||||
.as_str()
|
||||
.expect("events path"),
|
||||
);
|
||||
let events = std::fs::read_to_string(events_path).expect("read validation events");
|
||||
assert!(
|
||||
events
|
||||
.lines()
|
||||
.any(|line| line.contains("\"eventType\":\"object\""))
|
||||
);
|
||||
|
||||
let stage_timing = RunStageTiming {
|
||||
validation_ms: 1,
|
||||
@@ -1858,6 +1879,7 @@ fn write_json_writes_report() {
|
||||
downloads: Vec::new(),
|
||||
download_stats: crate::audit::AuditDownloadStats::default(),
|
||||
repo_sync_stats: crate::audit::AuditRepoSyncStats::default(),
|
||||
query_audit: None,
|
||||
};
|
||||
|
||||
let dir = tempfile::tempdir().expect("tmpdir");
|
||||
|
||||
Reference in New Issue
Block a user