Fix tests in nix and re-enable

This commit is contained in:
Alexandru Scvorțov
2025-11-06 16:36:51 +00:00
parent e905538269
commit b85fb5ea6f

View File

@@ -202,8 +202,25 @@ craneLib.buildPackage ( commonAttrs // {
env = buildDepsOnlyEnv;
});
# Disabled due to integration test failing to find /etc/resolv.conf
doCheck = false;
nativeCheckInputs = [
pkgsBuildHost.libredirect.hook
];
preCheck =
let
fakeResolvConf = pkgsBuildHost.writeTextFile {
name = "resolv.conf";
text = ''
nameserver 0.0.0.0
'';
};
in
''
export NIX_REDIRECTS="/etc/resolv.conf=${fakeResolvConf}"
export TUWUNEL_DATABASE_PATH="$(mktemp -d)/smoketest.db"
'';
doCheck = true;
doBenchmark = false;
cargoExtraArgs = "--no-default-features --locked "