mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 04:35:16 +08:00
@@ -229,6 +229,27 @@ fn official_update_first_run_pulls_without_pre_audit() {
|
||||
assert!(events
|
||||
.iter()
|
||||
.any(|event| { event.stage == "decision" && event.message.contains("首次拉取=true") }));
|
||||
|
||||
let published = report.published_version_path.as_ref().unwrap();
|
||||
assert!(published.exists());
|
||||
assert!(report
|
||||
.staging_path
|
||||
.as_ref()
|
||||
.is_some_and(|path| !path.exists()));
|
||||
assert!(config.output_root.join("current").exists());
|
||||
assert!(fs::symlink_metadata(config.output_root.join("current"))
|
||||
.unwrap()
|
||||
.file_type()
|
||||
.is_symlink());
|
||||
assert_eq!(
|
||||
config
|
||||
.output_root
|
||||
.join("official-download-manifest.json")
|
||||
.exists(),
|
||||
false
|
||||
);
|
||||
assert!(published.join("official-download-manifest.json").exists());
|
||||
assert!(published.join("official-sync-snapshot.json").exists());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -262,6 +283,11 @@ fn official_update_second_run_audits_existing_resources_before_reuse() {
|
||||
assert!(events.iter().any(|event| {
|
||||
event.stage == "decision" && event.message.contains("首次拉取=false")
|
||||
}));
|
||||
assert!(config.output_root.join("current").exists());
|
||||
assert!(fs::symlink_metadata(config.output_root.join("current"))
|
||||
.unwrap()
|
||||
.file_type()
|
||||
.is_symlink());
|
||||
}
|
||||
|
||||
struct TestHarness {
|
||||
|
||||
Reference in New Issue
Block a user