2020-04-24 23:36:52 +00:00
|
|
|
{ system ? builtins.currentSystem, config ? { }
|
|
|
|
, pkgs ? import ../.. { inherit system config; } }:
|
|
|
|
|
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
matomoTest = package:
|
|
|
|
makeTest {
|
2022-09-30 11:47:45 +00:00
|
|
|
name = "matomo";
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
nodes.machine = { config, pkgs, ... }: {
|
2020-04-24 23:36:52 +00:00
|
|
|
services.matomo = {
|
|
|
|
package = package;
|
|
|
|
enable = true;
|
|
|
|
nginx = {
|
|
|
|
forceSSL = false;
|
|
|
|
enableACME = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.mysql = {
|
|
|
|
enable = true;
|
2021-06-06 07:54:09 +00:00
|
|
|
package = pkgs.mariadb;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
services.nginx.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
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 {
|
|
|
|
matomo = matomoTest pkgs.matomo // {
|
|
|
|
name = "matomo";
|
2023-07-15 17:15:38 +00:00
|
|
|
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata twey boozedog ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
matomo-beta = matomoTest pkgs.matomo-beta // {
|
|
|
|
name = "matomo-beta";
|
2023-07-15 17:15:38 +00:00
|
|
|
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata twey boozedog ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
matomo_5 = matomoTest pkgs.matomo_5 // {
|
|
|
|
name = "matomo-5";
|
|
|
|
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata twey boozedog ] ++ lib.teams.flyingcircus.members;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|