1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00
nixpkgs/nixos/tests/matomo.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.3 KiB
Nix
Raw Normal View History

2019-10-04 21:38:58 +01:00
{ system ? builtins.currentSystem, config ? { }
, pkgs ? import ../.. { inherit system config; } }:
2019-11-30 23:50:55 +00:00
with import ../lib/testing-python.nix { inherit system pkgs; };
2019-10-04 21:38:58 +01:00
with pkgs.lib;
let
matomoTest = package:
makeTest {
2022-06-25 23:14:38 +01:00
name = "matomo";
2022-03-20 23:15:30 +00:00
nodes.machine = { config, pkgs, ... }: {
2019-10-04 21:38:58 +01:00
services.matomo = {
package = package;
enable = true;
nginx = {
forceSSL = false;
enableACME = false;
};
};
services.mysql = {
enable = true;
package = pkgs.mariadb;
2019-10-04 21:38:58 +01:00
};
services.nginx.enable = true;
};
testScript = ''
2019-11-30 23:50:55 +00: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 21:38:58 +01:00
'';
};
in {
matomo = matomoTest pkgs.matomo // {
name = "matomo";
2023-06-10 13:46:41 +01:00
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata twey boozedog ];
2019-10-04 21:38:58 +01:00
};
matomo-beta = matomoTest pkgs.matomo-beta // {
name = "matomo-beta";
2023-06-10 13:46:41 +01:00
meta.maintainers = with maintainers; [ florianjacob kiwi mmilata twey boozedog ];
2019-10-04 21:38:58 +01:00
};
}