diff options
author | Aaron Andersen <aaron@fosslib.net> | 2019-10-29 23:09:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 23:09:27 -0400 |
commit | 722b99beb99a7468d99fa42ce806a9a44d3b752f (patch) | |
tree | 8a425f391cf70988b75658a5aeb780f69777caa9 /nixos/tests | |
parent | f65db057f503a29dda22001b5176918ba84c966e (diff) | |
parent | 605379bc628f2fea85c144866d4bf8c2fe41ae33 (diff) | |
download | nixlib-722b99beb99a7468d99fa42ce806a9a44d3b752f.tar nixlib-722b99beb99a7468d99fa42ce806a9a44d3b752f.tar.gz nixlib-722b99beb99a7468d99fa42ce806a9a44d3b752f.tar.bz2 nixlib-722b99beb99a7468d99fa42ce806a9a44d3b752f.tar.lz nixlib-722b99beb99a7468d99fa42ce806a9a44d3b752f.tar.xz nixlib-722b99beb99a7468d99fa42ce806a9a44d3b752f.tar.zst nixlib-722b99beb99a7468d99fa42ce806a9a44d3b752f.zip |
Merge pull request #69342 from Kiwi/matomo-updates
Matomo (module, package) updates
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/matomo.nix | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 22270501dc1c..7acfbd216f14 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -159,6 +159,7 @@ in #logstash = handleTest ./logstash.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 {}; diff --git a/nixos/tests/matomo.nix b/nixos/tests/matomo.nix new file mode 100644 index 000000000000..4efa65a7b6de --- /dev/null +++ b/nixos/tests/matomo.nix @@ -0,0 +1,43 @@ +{ 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 mmilata ]; + }; + matomo-beta = matomoTest pkgs.matomo-beta // { + name = "matomo-beta"; + meta.maintainers = with maintainers; [ florianjacob kiwi mmilata ]; + }; +} |