nix: Move eval.nix tests into /hive

This commit is contained in:
Zhaofeng Li 2021-12-18 14:35:06 -08:00
parent d5c6f7cb0c
commit bd4493da73
5 changed files with 4 additions and 4 deletions

View file

@ -23,6 +23,9 @@ use super::NixCommand;
use crate::util::CommandExecution; use crate::util::CommandExecution;
use crate::job::JobHandle; use crate::job::JobHandle;
#[cfg(test)]
mod tests;
const HIVE_EVAL: &[u8] = include_bytes!("eval.nix"); const HIVE_EVAL: &[u8] = include_bytes!("eval.nix");
#[derive(Debug)] #[derive(Debug)]

View file

@ -154,7 +154,7 @@ fn test_parse_simple() {
#[test] #[test]
fn test_parse_flake() { 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 flake = block_on(Flake::from_dir(flake_dir)).unwrap();
let hive_path = HivePath::Flake(flake); let hive_path = HivePath::Flake(flake);

View file

@ -44,9 +44,6 @@ pub use flake::Flake;
pub mod node_filter; pub mod node_filter;
pub use node_filter::NodeFilter; pub use node_filter::NodeFilter;
#[cfg(test)]
mod tests;
pub const SYSTEM_PROFILE: &str = "/nix/var/nix/profiles/system"; pub const SYSTEM_PROFILE: &str = "/nix/var/nix/profiles/system";
pub type NixResult<T> = Result<T, NixError>; pub type NixResult<T> = Result<T, NixError>;