增加环境变量

This commit is contained in:
xiuting.xu
2026-05-18 11:42:33 +08:00
parent a11f2bc864
commit cdf9372929
18 changed files with 210 additions and 89 deletions

View File

@@ -62,6 +62,21 @@ fn find_latest_ccr_file_picks_latest_date_dir_first() {
assert_eq!(latest, newer);
}
#[test]
fn find_latest_ccr_file_skips_latest_empty_dir() {
let root = tempdir().expect("create temp root dir");
let older_dir = root.path().join("run_0011");
let newer_empty_dir = root.path().join("run_0012");
fs::create_dir_all(&older_dir).expect("create older dir");
fs::create_dir_all(&newer_empty_dir).expect("create newer empty dir");
let expected = older_dir.join("20260401T000001Z-a.ccr");
fs::write(&expected, b"older").expect("write older ccr");
let latest = find_latest_ccr_file(root.path()).expect("find latest ccr");
assert_eq!(latest, expected);
}
#[test]
fn snapshot_to_payloads_with_options_skips_invalid_aspa_when_not_strict() {
let snapshot = ParsedCcrSnapshot {