From 2633ca3f883bb5f1bba7eb8a310cdf401680fe3b Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 4 Mar 2024 05:27:18 +0100 Subject: [PATCH] Merge pull request #9288 from edolstra/fix-nar-access-test Fix nar-access test on macOS (cherry picked from commit e9a857e4189241d23111e18e284ab7ac9d56b798) Change-Id: I2fd2ec3e6ccb88350bdcd2ba15ccfd77275399c9 --- tests/functional/nar-access.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/nar-access.sh b/tests/functional/nar-access.sh index d487d58d2..426068e68 100644 --- a/tests/functional/nar-access.sh +++ b/tests/functional/nar-access.sh @@ -25,6 +25,11 @@ diff -u baz.cat-nar $storePath/foo/baz nix store cat $storePath/foo/baz > baz.cat-nar diff -u baz.cat-nar $storePath/foo/baz +# Check that 'nix store cat' fails on invalid store paths. +invalidPath="$(dirname $storePath)/99999999999999999999999999999999-foo" +cp -r $storePath $invalidPath +expect 1 nix store cat $invalidPath/foo/baz + # Test --json. diff -u \ <(nix nar ls --json $narFile / | jq -S) \