Merge pull request #5995 from NixOS/test-nix-store-ping
Add some tests for `nix store ping`
This commit is contained in:
commit
e9d2ac6d7f
|
@ -62,6 +62,7 @@ nix_tests = \
|
||||||
ca/nix-copy.sh \
|
ca/nix-copy.sh \
|
||||||
eval-store.sh \
|
eval-store.sh \
|
||||||
readfile-context.sh \
|
readfile-context.sh \
|
||||||
|
store-ping.sh \
|
||||||
why-depends.sh
|
why-depends.sh
|
||||||
# parallel.sh
|
# parallel.sh
|
||||||
|
|
||||||
|
|
12
tests/store-ping.sh
Normal file
12
tests/store-ping.sh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
source common.sh
|
||||||
|
|
||||||
|
STORE_INFO=$(nix store ping 2>&1)
|
||||||
|
|
||||||
|
echo "$STORE_INFO" | grep "Store URL: ${NIX_REMOTE}"
|
||||||
|
|
||||||
|
if isDaemonNewer "2.7pre20220126"; then
|
||||||
|
echo "$STORE_INFO" | grep "Version: $($NIX_DAEMON_PACKAGE/bin/nix-daemon --version)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
expect 127 NIX_REMOTE=unix:$PWD/store nix store ping || \
|
||||||
|
fail "nix store ping on a non-existent store should fail"
|
Loading…
Reference in a new issue