Merge pull request #143366 from Synthetica9/yq-test-rm

This commit is contained in:
Sandro 2021-10-28 18:00:54 +02:00 committed by GitHub
commit bb9350344e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 14 deletions

View File

@ -499,7 +499,6 @@ in
xterm = handleTest ./xterm.nix {};
yabar = handleTest ./yabar.nix {};
yggdrasil = handleTest ./yggdrasil.nix {};
yq = handleTest ./yq.nix {};
zfs = handleTest ./zfs.nix {};
zigbee2mqtt = handleTest ./zigbee2mqtt.nix {};
zoneminder = handleTest ./zoneminder.nix {};

View File

@ -1,12 +0,0 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "yq";
meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.yq = { pkgs, ... }: { environment.systemPackages = with pkgs; [ jq yq ]; };
testScript = ''
assert "hello:\n foo: bar\n" in yq.succeed(
'echo \'{"hello":{"foo":"bar"}}\' | yq -y .'
)
'';
})

View File

@ -45,7 +45,10 @@ buildPythonPackage rec {
pythonImportsCheck = [ "yq" ];
passthru.tests = { inherit (nixosTests) yq; };
doInstallCheck = true;
installCheckPhase = ''
echo '{"hello":{"foo":"bar"}}' | $out/bin/yq -y . | grep 'foo: bar'
'';
meta = with lib; {
description = "Command-line YAML processor - jq wrapper for YAML documents";