Better test fix

This commit is contained in:
Eelco Dolstra 2024-02-02 13:22:18 +01:00
parent 05535be03a
commit e67458e5b8

View file

@ -80,6 +80,7 @@ test -x $outPath/fetchurl.sh
test -L $outPath/symlink test -L $outPath/symlink
# Make sure that *not* passing a outputHash fails. # Make sure that *not* passing a outputHash fails.
requireDaemonNewerThan "2.20"
expected=100 expected=100
if [[ -v NIX_DAEMON_PACKAGE ]]; then expected=1; fi # work around the daemon not returning a 100 status correctly if [[ -v NIX_DAEMON_PACKAGE ]]; then expected=1; fi # work around the daemon not returning a 100 status correctly
expectStderr $expected nix-build --expr '{ url }: builtins.derivation { name = "nix-cache-info"; system = "x86_64-linux"; builder = "builtin:fetchurl"; inherit url; outputHashMode = "flat"; }' --argstr url file://$narxz 2>&1 | grep 'must be a fixed-output derivation' expectStderr $expected nix-build --expr '{ url }: builtins.derivation { name = "nix-cache-info"; system = "x86_64-linux"; builder = "builtin:fetchurl"; inherit url; outputHashMode = "flat"; }' --argstr url file://$narxz 2>&1 | grep 'must be a fixed-output derivation'