2019-10-04 23:38:58 +03:00
|
|
|
{ system ? builtins.currentSystem, config ? { }
|
|
|
|
, pkgs ? import ../.. { inherit system config; } }:
|
|
|
|
|
2019-12-01 02:50:55 +03:00
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
2019-10-04 23:38:58 +03:00
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
matomoTest = package:
|
|
|
|
makeTest {
|
2022-06-26 01:14:38 +03:00
|
|
|
name = "matomo";
|
|
|
|
|
2022-03-21 02:15:30 +03:00
|
|
|
nodes.machine = { config, pkgs, ... }: {
|
2019-10-04 23:38:58 +03:00
|
|
|
services.matomo = {
|
|
|
|
package = package;
|
|
|
|
enable = true;
|
|
|
|
nginx = {
|
|
|
|
forceSSL = false;
|
|
|
|
enableACME = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.mysql = {
|
|
|
|
enable = true;
|
2021-06-04 17:08:41 +03:00
|
|
|
package = pkgs.mariadb;
|
2019-10-04 23:38:58 +03:00
|
|
|
};
|
|
|
|
services.nginx.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-12-01 02:50:55 +03:00
|
|
|
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'"
|
|
|
|
)
|
2019-10-04 23:38:58 +03:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
matomo = matomoTest pkgs.matomo // {
|
|
|
|
name = "matomo";
|
2024-06-12 11:11:01 +03:00
|
|
|
meta.maintainers = with maintainers; [ florianjacob mmilata twey boozedog ];
|
2019-10-04 23:38:58 +03:00
|
|
|
};
|
|
|
|
matomo-beta = matomoTest pkgs.matomo-beta // {
|
|
|
|
name = "matomo-beta";
|
2024-06-12 11:11:01 +03:00
|
|
|
meta.maintainers = with maintainers; [ florianjacob mmilata twey boozedog ];
|
2019-10-04 23:38:58 +03:00
|
|
|
};
|
2024-01-11 10:33:36 +03:00
|
|
|
matomo_5 = matomoTest pkgs.matomo_5 // {
|
|
|
|
name = "matomo-5";
|
2024-06-12 11:11:01 +03:00
|
|
|
meta.maintainers = with maintainers; [ florianjacob mmilata twey boozedog ] ++ lib.teams.flyingcircus.members;
|
2024-01-11 10:33:36 +03:00
|
|
|
};
|
2019-10-04 23:38:58 +03:00
|
|
|
}
|