mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 22:30:23 +00:00
nixos/matomo: add test
cherry-pick: removed matomo-beta test because there's no beta package
This commit is contained in:
@@ -157,6 +157,7 @@ in
|
||||
magnetico = handleTest ./magnetico.nix {};
|
||||
mailcatcher = handleTest ./mailcatcher.nix {};
|
||||
mathics = handleTest ./mathics.nix {};
|
||||
matomo = handleTest ./matomo.nix {};
|
||||
matrix-synapse = handleTest ./matrix-synapse.nix {};
|
||||
mediawiki = handleTest ./mediawiki.nix {};
|
||||
memcached = handleTest ./memcached.nix {};
|
||||
|
||||
39
nixos/tests/matomo.nix
Normal file
39
nixos/tests/matomo.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ system ? builtins.currentSystem, config ? { }
|
||||
, pkgs ? import ../.. { inherit system config; } }:
|
||||
|
||||
with import ../lib/testing.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
matomoTest = package:
|
||||
makeTest {
|
||||
machine = { config, pkgs, ... }: {
|
||||
services.matomo = {
|
||||
package = package;
|
||||
enable = true;
|
||||
nginx = {
|
||||
forceSSL = false;
|
||||
enableACME = false;
|
||||
};
|
||||
};
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mysql;
|
||||
};
|
||||
services.nginx.enable = true;
|
||||
};
|
||||
|
||||
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'");
|
||||
'';
|
||||
};
|
||||
in {
|
||||
matomo = matomoTest pkgs.matomo // {
|
||||
name = "matomo";
|
||||
meta.maintainers = with maintainers; [ florianjacob kiwi ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user