diff --git a/src/nix/hive/mod.rs b/src/nix/hive/mod.rs index 7b8af23..9144c2d 100644 --- a/src/nix/hive/mod.rs +++ b/src/nix/hive/mod.rs @@ -23,6 +23,9 @@ use super::NixCommand; use crate::util::CommandExecution; use crate::job::JobHandle; +#[cfg(test)] +mod tests; + const HIVE_EVAL: &[u8] = include_bytes!("eval.nix"); #[derive(Debug)] diff --git a/src/nix/tests/mod.rs b/src/nix/hive/tests/mod.rs similarity index 99% rename from src/nix/tests/mod.rs rename to src/nix/hive/tests/mod.rs index 258a315..e4c7d62 100644 --- a/src/nix/tests/mod.rs +++ b/src/nix/hive/tests/mod.rs @@ -154,7 +154,7 @@ fn test_parse_simple() { #[test] fn test_parse_flake() { - let flake_dir = PathBuf::from("./src/nix/tests/simple-flake"); + let flake_dir = PathBuf::from("./src/nix/hive/tests/simple-flake"); let flake = block_on(Flake::from_dir(flake_dir)).unwrap(); let hive_path = HivePath::Flake(flake); diff --git a/src/nix/tests/simple-flake/flake.lock b/src/nix/hive/tests/simple-flake/flake.lock similarity index 100% rename from src/nix/tests/simple-flake/flake.lock rename to src/nix/hive/tests/simple-flake/flake.lock diff --git a/src/nix/tests/simple-flake/flake.nix b/src/nix/hive/tests/simple-flake/flake.nix similarity index 100% rename from src/nix/tests/simple-flake/flake.nix rename to src/nix/hive/tests/simple-flake/flake.nix diff --git a/src/nix/mod.rs b/src/nix/mod.rs index 6bb7fc7..0f68db6 100644 --- a/src/nix/mod.rs +++ b/src/nix/mod.rs @@ -44,9 +44,6 @@ pub use flake::Flake; pub mod node_filter; pub use node_filter::NodeFilter; -#[cfg(test)] -mod tests; - pub const SYSTEM_PROFILE: &str = "/nix/var/nix/profiles/system"; pub type NixResult = Result;