diff options
author | Martin Milata <martin@martinmilata.cz> | 2019-12-01 00:50:55 +0100 |
---|---|---|
committer | Martin Milata <martin@martinmilata.cz> | 2019-12-01 00:50:55 +0100 |
commit | 1a5d3070ac825a080f21013364f01928e0920076 (patch) | |
tree | 0a4f92fa3db8f251ee1ab199d464219fe7aa59a5 /nixos/tests/matomo.nix | |
parent | 555e06c7888205ed8c7eeab4aa5b30e49980f11b (diff) | |
download | nixpkgs-1a5d3070ac825a080f21013364f01928e0920076.tar nixpkgs-1a5d3070ac825a080f21013364f01928e0920076.tar.gz nixpkgs-1a5d3070ac825a080f21013364f01928e0920076.tar.bz2 nixpkgs-1a5d3070ac825a080f21013364f01928e0920076.tar.lz nixpkgs-1a5d3070ac825a080f21013364f01928e0920076.tar.xz nixpkgs-1a5d3070ac825a080f21013364f01928e0920076.tar.zst nixpkgs-1a5d3070ac825a080f21013364f01928e0920076.zip |
nixosTests.matomo: port to python
Diffstat (limited to 'nixos/tests/matomo.nix')
-rw-r--r-- | nixos/tests/matomo.nix | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/nixos/tests/matomo.nix b/nixos/tests/matomo.nix index 4efa65a7b6d..2bea237c8bd 100644 --- a/nixos/tests/matomo.nix +++ b/nixos/tests/matomo.nix @@ -1,7 +1,7 @@ { system ? builtins.currentSystem, config ? { } , pkgs ? import ../.. { inherit system config; } }: -with import ../lib/testing.nix { inherit system pkgs; }; +with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; let @@ -24,11 +24,16 @@ let }; testScript = '' - startAll; - $machine->waitForUnit("mysql.service"); - $machine->waitForUnit("phpfpm-matomo.service"); - $machine->waitForUnit("nginx.service"); - $machine->succeed("curl -sSfL http://localhost/ | grep '<title>Matomo[^<]*Installation'"); + start_all() + machine.wait_for_unit("mysql.service") + machine.wait_for_unit("phpfpm-matomo.service") + machine.wait_for_unit("nginx.service") + + # without the grep the command does not produce valid utf-8 for some reason + with subtest("welcome screen loads"): + machine.succeed( + "curl -sSfL http://localhost/ | grep '<title>Matomo[^<]*Installation'" + ) ''; }; in { |