mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 15:56:18 +02:00
Merge pull request #5995 from NixOS/test-nix-store-ping
Add some tests for `nix store ping`
This commit is contained in:
commit
e9d2ac6d7f
2 changed files with 13 additions and 0 deletions
|
@ -62,6 +62,7 @@ nix_tests = \
|
|||
ca/nix-copy.sh \
|
||||
eval-store.sh \
|
||||
readfile-context.sh \
|
||||
store-ping.sh \
|
||||
why-depends.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