20260608 默认rsync scope切到module-root
This commit is contained in:
@@ -233,7 +233,7 @@ Options:
|
||||
--http-timeout-secs <n> HTTP fetch timeout seconds (default: 20)
|
||||
--rsync-timeout-secs <n> rsync I/O timeout seconds (default: 60)
|
||||
--rsync-mirror-root <path> Persist rsync mirrors under this directory (default: disabled)
|
||||
--rsync-scope <policy> rsync scope policy: host, publication-point, or module-root (default: host)
|
||||
--rsync-scope <policy> rsync scope policy: host, publication-point, or module-root (default: module-root)
|
||||
--max-depth <n> Max CA instance depth (0 = root only)
|
||||
--max-instances <n> Max number of CA instances to process
|
||||
--validation-time <rfc3339> Validation time in RFC3339 (default: now UTC)
|
||||
|
||||
@@ -22,7 +22,7 @@ pub enum RsyncScopePolicy {
|
||||
|
||||
impl Default for RsyncScopePolicy {
|
||||
fn default() -> Self {
|
||||
Self::Host
|
||||
Self::ModuleRoot
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,15 +563,15 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn system_rsync_dedup_key_uses_host_scope_by_default() {
|
||||
fn system_rsync_dedup_key_uses_module_root_by_default() {
|
||||
let fetcher = SystemRsyncFetcher::new(SystemRsyncConfig::default());
|
||||
assert_eq!(
|
||||
fetcher.dedup_key("rsync://example.net/repo/ta/ca/publication-point/"),
|
||||
"rsync://example.net/repo/ta/ca/publication-point/"
|
||||
"rsync://example.net/repo/"
|
||||
);
|
||||
assert_eq!(
|
||||
fetcher.failure_dedup_key("rsync://example.net/repo/ta/ca/publication-point/"),
|
||||
Some("rsync://example.net/".to_string())
|
||||
None
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user