diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-02 09:55:07 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-02 09:55:07 -0500 |
commit | 87ca46263dbf88eb8ee606078738bde348689bc6 (patch) | |
tree | 82cd4c411bdbb865c4609eb968092b5cf4cc3395 /tests | |
parent | ee9eb83a842eb97d0180fd9d349d30ff27fdb485 (diff) | |
parent | 119ba50eb840d812d7175cdc105d9e38dabb5773 (diff) |
Merge branch 'master' into path-info
Diffstat (limited to 'tests')
-rw-r--r-- | tests/store-ping.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/store-ping.sh b/tests/store-ping.sh index f9427cf0a..9846c7d3d 100644 --- a/tests/store-ping.sh +++ b/tests/store-ping.sh @@ -1,13 +1,17 @@ source common.sh STORE_INFO=$(nix store ping 2>&1) +STORE_INFO_JSON=$(nix store ping --json) echo "$STORE_INFO" | grep "Store URL: ${NIX_REMOTE}" if [[ -v NIX_DAEMON_PACKAGE ]] && isDaemonNewer "2.7.0pre20220126"; then DAEMON_VERSION=$($NIX_DAEMON_PACKAGE/bin/nix-daemon --version | cut -d' ' -f3) echo "$STORE_INFO" | grep "Version: $DAEMON_VERSION" + [[ "$(echo "$STORE_INFO_JSON" | jq -r ".version")" == "$DAEMON_VERSION" ]] fi expect 127 NIX_REMOTE=unix:$PWD/store nix store ping || \ fail "nix store ping on a non-existent store should fail" + +[[ "$(echo "$STORE_INFO_JSON" | jq -r ".url")" == "${NIX_REMOTE:-local}" ]] |