diff options
author | talyz <kim.lindberger@gmail.com> | 2021-06-05 15:50:58 +0200 |
---|---|---|
committer | talyz <kim.lindberger@gmail.com> | 2021-06-05 18:44:54 +0200 |
commit | 3d9c3e5cfd8705b03a175ef40f6eeaa9a16634ff (patch) | |
tree | 69f57ede899503635b6b17fea23e6f0a976c9991 /nixos/tests/miniflux.nix | |
parent | a86853501a339f95765a6763e9c409f374606faa (diff) | |
download | nixpkgs-3d9c3e5cfd8705b03a175ef40f6eeaa9a16634ff.tar nixpkgs-3d9c3e5cfd8705b03a175ef40f6eeaa9a16634ff.tar.gz nixpkgs-3d9c3e5cfd8705b03a175ef40f6eeaa9a16634ff.tar.bz2 nixpkgs-3d9c3e5cfd8705b03a175ef40f6eeaa9a16634ff.tar.lz nixpkgs-3d9c3e5cfd8705b03a175ef40f6eeaa9a16634ff.tar.xz nixpkgs-3d9c3e5cfd8705b03a175ef40f6eeaa9a16634ff.tar.zst nixpkgs-3d9c3e5cfd8705b03a175ef40f6eeaa9a16634ff.zip |
nixosTests.*: Don't use the `-q` flag with grep when used with curl
The `-q` flag makes grep close the pipe early, which curl doesn't handle gracefully, but exits with an error like "(23) Failed writing body".
Diffstat (limited to 'nixos/tests/miniflux.nix')
-rw-r--r-- | nixos/tests/miniflux.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/tests/miniflux.nix b/nixos/tests/miniflux.nix index 797a2787d1a..9a25a9e77cc 100644 --- a/nixos/tests/miniflux.nix +++ b/nixos/tests/miniflux.nix @@ -48,23 +48,23 @@ with lib; default.wait_for_unit("miniflux.service") default.wait_for_open_port(${toString defaultPort}) - default.succeed("curl --fail 'http://localhost:${toString defaultPort}/healthcheck' | grep -q OK") + default.succeed("curl --fail 'http://localhost:${toString defaultPort}/healthcheck' | grep OK") default.succeed( - "curl 'http://localhost:${toString defaultPort}/v1/me' -u '${defaultUsername}:${defaultPassword}' -H Content-Type:application/json | grep -q '\"is_admin\":true'" + "curl 'http://localhost:${toString defaultPort}/v1/me' -u '${defaultUsername}:${defaultPassword}' -H Content-Type:application/json | grep '\"is_admin\":true'" ) withoutSudo.wait_for_unit("miniflux.service") withoutSudo.wait_for_open_port(${toString defaultPort}) - withoutSudo.succeed("curl --fail 'http://localhost:${toString defaultPort}/healthcheck' | grep -q OK") + withoutSudo.succeed("curl --fail 'http://localhost:${toString defaultPort}/healthcheck' | grep OK") withoutSudo.succeed( - "curl 'http://localhost:${toString defaultPort}/v1/me' -u '${defaultUsername}:${defaultPassword}' -H Content-Type:application/json | grep -q '\"is_admin\":true'" + "curl 'http://localhost:${toString defaultPort}/v1/me' -u '${defaultUsername}:${defaultPassword}' -H Content-Type:application/json | grep '\"is_admin\":true'" ) customized.wait_for_unit("miniflux.service") customized.wait_for_open_port(${toString port}) - customized.succeed("curl --fail 'http://localhost:${toString port}/healthcheck' | grep -q OK") + customized.succeed("curl --fail 'http://localhost:${toString port}/healthcheck' | grep OK") customized.succeed( - "curl 'http://localhost:${toString port}/v1/me' -u '${username}:${password}' -H Content-Type:application/json | grep -q '\"is_admin\":true'" + "curl 'http://localhost:${toString port}/v1/me' -u '${username}:${password}' -H Content-Type:application/json | grep '\"is_admin\":true'" ) ''; }) |