1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

shellcheck fix: tests/functional/read-only-store.sh

This commit is contained in:
Farid Zakaria 2025-09-30 19:57:29 -07:00
parent 1492c1bc5d
commit c8a7719614
2 changed files with 4 additions and 5 deletions

View file

@ -106,7 +106,6 @@
enable = true; enable = true;
excludes = [ excludes = [
# We haven't linted these files yet # We haven't linted these files yet
''^tests/functional/read-only-store\.sh$''
''^tests/functional/readfile-context\.sh$'' ''^tests/functional/readfile-context\.sh$''
''^tests/functional/recursive\.sh$'' ''^tests/functional/recursive\.sh$''
''^tests/functional/referrers\.sh$'' ''^tests/functional/referrers\.sh$''

View file

@ -12,10 +12,10 @@ clearStore
happy () { happy () {
# We can do a read-only query just fine with a read-only store # We can do a read-only query just fine with a read-only store
nix --store local?read-only=true path-info $dummyPath nix --store local?read-only=true path-info "$dummyPath"
# `local://` also works. # `local://` also works.
nix --store local://?read-only=true path-info $dummyPath nix --store local://?read-only=true path-info "$dummyPath"
# We can "write" an already-present store-path a read-only store, because no IO is actually required # We can "write" an already-present store-path a read-only store, because no IO is actually required
nix-store --store local?read-only=true --add dummy nix-store --store local?read-only=true --add dummy
@ -37,8 +37,8 @@ happy
## Testing read-only mode with an underlying store that is actually read-only ## Testing read-only mode with an underlying store that is actually read-only
# Ensure store is actually read-only # Ensure store is actually read-only
chmod -R -w $TEST_ROOT/store chmod -R -w "$TEST_ROOT"/store
chmod -R -w $TEST_ROOT/var chmod -R -w "$TEST_ROOT"/var
# Make sure we fail on add operations on the read-only store # Make sure we fail on add operations on the read-only store
# This is only for adding files that are not *already* in the store # This is only for adding files that are not *already* in the store