maint: Unset substituters in nix-expr tests

Runs offline, and would only slow things down.

(cherry picked from commit ea3ef1c59a1fe8e380302acc1885877a1ac8e0b6)
This commit is contained in:
Robert Hensing 2024-11-26 14:52:49 +01:00
parent 77c9be2cbf
commit 1c0e2cd72f

View file

@ -538,6 +538,9 @@ pub fn test_init() {
// which causes an error. So we set a custom build dir here.
nix_util::settings::set("sandbox-build-dir", "/custom-build-dir-for-test").unwrap();
std::env::set_var("_NIX_TEST_NO_SANDBOX", "1");
// The tests run offline
nix_util::settings::set("substituters", "").unwrap();
}
#[cfg(test)]