手动执行全量同步
This commit is contained in:
@@ -236,6 +236,7 @@ fn tree_respects_max_depth_and_max_instances() {
|
||||
&TreeRunConfig {
|
||||
max_depth: Some(0),
|
||||
max_instances: None,
|
||||
revalidate_only: false,
|
||||
},
|
||||
)
|
||||
.expect("run tree depth-limited");
|
||||
@@ -248,6 +249,7 @@ fn tree_respects_max_depth_and_max_instances() {
|
||||
&TreeRunConfig {
|
||||
max_depth: None,
|
||||
max_instances: Some(1),
|
||||
revalidate_only: false,
|
||||
},
|
||||
)
|
||||
.expect("run tree instance-limited");
|
||||
@@ -316,3 +318,69 @@ fn tree_audit_includes_parent_and_discovered_from_for_non_root_nodes() {
|
||||
.expect("child discovered_from");
|
||||
assert_eq!(df.parent_manifest_rsync_uri, root_manifest);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tree_revalidate_only_enqueues_children_from_fetch_cache_pp() {
|
||||
let root_manifest = "rsync://example.test/repo/root.mft";
|
||||
let child_manifest = "rsync://example.test/repo/child.mft";
|
||||
|
||||
let runner = MockRunner::default()
|
||||
.with(
|
||||
root_manifest,
|
||||
PublicationPointRunResult {
|
||||
source: PublicationPointSource::FetchCachePp,
|
||||
pack: empty_pack(root_manifest, "rsync://example.test/repo/"),
|
||||
warnings: Vec::new(),
|
||||
objects: ObjectsOutput {
|
||||
vrps: Vec::new(),
|
||||
aspas: Vec::new(),
|
||||
warnings: Vec::new(),
|
||||
stats: ObjectsStats::default(),
|
||||
audit: Vec::new(),
|
||||
},
|
||||
audit: PublicationPointAudit::default(),
|
||||
discovered_children: vec![discovered_child(root_manifest, child_manifest)],
|
||||
},
|
||||
)
|
||||
.with(
|
||||
child_manifest,
|
||||
PublicationPointRunResult {
|
||||
source: PublicationPointSource::FetchCachePp,
|
||||
pack: empty_pack(child_manifest, "rsync://example.test/repo/child/"),
|
||||
warnings: Vec::new(),
|
||||
objects: ObjectsOutput {
|
||||
vrps: Vec::new(),
|
||||
aspas: Vec::new(),
|
||||
warnings: Vec::new(),
|
||||
stats: ObjectsStats::default(),
|
||||
audit: Vec::new(),
|
||||
},
|
||||
audit: PublicationPointAudit::default(),
|
||||
discovered_children: Vec::new(),
|
||||
},
|
||||
);
|
||||
|
||||
let out = run_tree_serial(
|
||||
ca_handle(root_manifest),
|
||||
&runner,
|
||||
&TreeRunConfig {
|
||||
max_depth: None,
|
||||
max_instances: None,
|
||||
revalidate_only: false,
|
||||
},
|
||||
)
|
||||
.expect("run tree");
|
||||
assert_eq!(out.instances_processed, 1);
|
||||
|
||||
let out = run_tree_serial(
|
||||
ca_handle(root_manifest),
|
||||
&runner,
|
||||
&TreeRunConfig {
|
||||
max_depth: None,
|
||||
max_instances: None,
|
||||
revalidate_only: true,
|
||||
},
|
||||
)
|
||||
.expect("run tree");
|
||||
assert_eq!(out.instances_processed, 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user