summary refs log tree commit diff
path: root/nixos/tests/yq.nix
blob: cdcb3d6e2462d8c21fc4706dc86fe168f69354c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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 .'
    )
  '';
})