diff options
author | regnat <rg@regnat.ovh> | 2022-01-26 11:01:25 +0100 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2022-01-26 11:01:25 +0100 |
commit | d139474f484ef16850e0d6d3f8706c5bd1f352d0 (patch) | |
tree | c02e6f6bac116dcb0bb5e12d0e7b07be88f5b984 /tests | |
parent | 4f24a33d34a03a04610f6be196b1f3d64c2f4744 (diff) |
Add some tests for `nix store ping`
Always good to have :)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/local.mk | 1 | ||||
-rw-r--r-- | tests/store-ping.sh | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/local.mk b/tests/local.mk index 93cf20d43..47d2862a4 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -62,6 +62,7 @@ nix_tests = \ ca/nix-copy.sh \ eval-store.sh \ readfile-context.sh \ + store-ping.sh \ why-depends.sh # parallel.sh diff --git a/tests/store-ping.sh b/tests/store-ping.sh new file mode 100644 index 000000000..4e8c8b770 --- /dev/null +++ b/tests/store-ping.sh @@ -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" |