aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/local.mk1
-rw-r--r--tests/store-ping.sh12
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"