test: preserve signed fixture bytes and canonicalize temporary paths

This commit is contained in:
Emil
2026-09-09 20:25:45 +03:00
parent cbc727829c
commit 738399b452
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
# Signed updater fixtures must retain their exact committed bytes on every OS.
src-tauri/tests/fixtures/updater/* -text
+5 -1
View File
@@ -494,7 +494,11 @@ mod tests {
impl Fixture {
fn new() -> Self {
let root = Stage::new(&std::env::temp_dir()).unwrap();
// macOS temporary directories may use the system /var -> /private/var
// alias. Canonicalize only this trusted fixture anchor; production
// safe_path must continue rejecting root/descendant substitutions.
let temporary_root = std::env::temp_dir().canonicalize().unwrap();
let root = Stage::new(&temporary_root).unwrap();
let game = root.0.join("game");
let cache = root.0.join("cache");
let input = jar_bytes(b"verified vanilla");