From 849a3fcae2a301cf7335d89fa65755251ad88c1a Mon Sep 17 00:00:00 2001 From: arcayr Date: Mon, 30 Sep 2024 21:45:50 +1000 Subject: [PATCH] chore/tests: fix phase::fetch::test_source() with new fixtures location. --- crates/ia/src/lib.rs | 6 ++++-- crates/ia/src/tests/phase/fetch/mod.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/ia/src/lib.rs b/crates/ia/src/lib.rs index 9cfc615..1c400e5 100644 --- a/crates/ia/src/lib.rs +++ b/crates/ia/src/lib.rs @@ -1,3 +1,6 @@ +#[cfg(test)] +mod tests; + mod error; mod hash; use std::{ @@ -13,8 +16,7 @@ pub use manifest::Manifest; use tracing::{debug, warn}; pub mod phase; -#[cfg(test)] -mod tests; + #[derive(strum::Display)] enum ArchiveType { diff --git a/crates/ia/src/tests/phase/fetch/mod.rs b/crates/ia/src/tests/phase/fetch/mod.rs index 33c735b..9400ee8 100644 --- a/crates/ia/src/tests/phase/fetch/mod.rs +++ b/crates/ia/src/tests/phase/fetch/mod.rs @@ -17,7 +17,7 @@ const SOURCE_FILE_HASH: &str = "0c984b1b4ebc120d693d33ebda78d26fd91f27614de387c4 fn test_source() -> Source { Source::new( SOURCE_FILE_NAME.to_string(), - String::from("file:./fixtures/package/source-test.txt"), + String::from("file:../../fixtures/package/source-test.txt"), Hash::new(HashAlgorithm::Sha2, String::new()).unwrap(), ) }