From 4fb9ba02e4b81d142c5b96065de41deae98eea56 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 22 Feb 2021 18:51:28 -0500 Subject: [PATCH] jq: Replace VM test --- nixos/tests/all-tests.nix | 1 - nixos/tests/jq.nix | 10 ---------- pkgs/development/tools/jq/default.nix | 3 +-- 3 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 nixos/tests/jq.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index b0561c36fe4a..541e0bc0a5cf 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -182,7 +182,6 @@ in jenkins = handleTest ./jenkins.nix {}; jirafeau = handleTest ./jirafeau.nix {}; jitsi-meet = handleTest ./jitsi-meet.nix {}; - jq = handleTest ./jq.nix {}; k3s = handleTest ./k3s.nix {}; kafka = handleTest ./kafka.nix {}; keepalived = handleTest ./keepalived.nix {}; diff --git a/nixos/tests/jq.nix b/nixos/tests/jq.nix deleted file mode 100644 index 075e6c43c09d..000000000000 --- a/nixos/tests/jq.nix +++ /dev/null @@ -1,10 +0,0 @@ -import ./make-test-python.nix ({ pkgs, ... }: { - name = "jq"; - meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; }; - - nodes.jq = { pkgs, ... }: { environment.systemPackages = [ pkgs.jq ]; }; - - testScript = '' - assert "world" in jq.succeed('echo \'{"values":["hello","world"]}\'| jq \'.values[1]\''') - ''; -}) diff --git a/pkgs/development/tools/jq/default.nix b/pkgs/development/tools/jq/default.nix index e8fe27aae099..ad4304fc6e1f 100644 --- a/pkgs/development/tools/jq/default.nix +++ b/pkgs/development/tools/jq/default.nix @@ -28,10 +28,9 @@ stdenv.mkDerivation rec { postInstallCheck = '' $bin/bin/jq --help >/dev/null + $bin/bin/jq -r '.values[1]' <<< '{"values":["hello","world"]}' | grep '^world$' > /dev/null ''; - passthru.tests = { inherit (nixosTests) jq; }; - meta = with lib; { description = "A lightweight and flexible command-line JSON processor"; license = licenses.mit;