fix(tvix/eval): nix_search_path.rs: use /etc instead of /bin

On Debian machines (and most FHS distros) /bin is now a symlink to
/usr/bin, which causes this test to fail.  Let's use /etc as a
root-relative test case, since it is less likely to be a symlink.

Signed-off-by: Adam Joseph <adam@westernsemico.com>
Change-Id: I1c94de0d2a242394182442fe1c895dc17eb04a4a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6994
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
Adam Joseph 2022-10-12 22:10:06 -07:00
parent e83609a061
commit 534a2f95f8

View file

@ -186,8 +186,8 @@ mod tests {
#[test] #[test]
fn second_in_path() { fn second_in_path() {
let nix_search_path = NixSearchPath::from_str("./.:/").unwrap(); let nix_search_path = NixSearchPath::from_str("./.:/").unwrap();
let res = nix_search_path.resolve("bin").unwrap(); let res = nix_search_path.resolve("etc").unwrap();
assert_eq!(res, Path::new("/bin")); assert_eq!(res, Path::new("/etc"));
} }
#[test] #[test]