Skip to content

Commit fc6d9cc

Browse files
committed
nixosTests.matomo: extend test coverage
1 parent 10f670a commit fc6d9cc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

nixos/tests/matomo.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,25 @@ let
3737
machine.wait_for_unit("phpfpm-matomo.service")
3838
machine.wait_for_unit("nginx.service")
3939
40+
with subtest("matomo.js reachable via HTTP"):
41+
machine.succeed("curl -sSfk http://machine/matomo.js")
42+
43+
with subtest("js/piwik.js reachable via HTTP"):
44+
machine.succeed("curl -sSfk http://machine/js/piwik.js")
45+
46+
with subtest("matomo.php (API) reachable via HTTP"):
47+
machine.succeed("curl -sSfk http://machine/matomo.php")
48+
4049
# without the grep the command does not produce valid utf-8 for some reason
4150
with subtest("welcome screen loads"):
4251
machine.succeed(
4352
"curl -sSfL http://localhost/ | grep '<title>Matomo[^<]*Installation'"
4453
)
54+
55+
with subtest("killing the phpfpm process should trigger an automatic restart"):
56+
machine.succeed("systemctl kill -s KILL phpfpm-matomo")
57+
machine.sleep(1)
58+
machine.wait_for_unit("phpfpm-matomo.service")
4559
'';
4660
};
4761
in

0 commit comments

Comments
 (0)