zammad: add module test
This commit is contained in:
parent
9bc86d946b
commit
e662b519a2
3 changed files with 30 additions and 0 deletions
|
@ -571,6 +571,7 @@ in
|
||||||
xxh = handleTest ./xxh.nix {};
|
xxh = handleTest ./xxh.nix {};
|
||||||
yabar = handleTest ./yabar.nix {};
|
yabar = handleTest ./yabar.nix {};
|
||||||
yggdrasil = handleTest ./yggdrasil.nix {};
|
yggdrasil = handleTest ./yggdrasil.nix {};
|
||||||
|
zammad = handleTest ./zammad {};
|
||||||
zfs = handleTest ./zfs.nix {};
|
zfs = handleTest ./zfs.nix {};
|
||||||
zigbee2mqtt = handleTest ./zigbee2mqtt.nix {};
|
zigbee2mqtt = handleTest ./zigbee2mqtt.nix {};
|
||||||
zoneminder = handleTest ./zoneminder.nix {};
|
zoneminder = handleTest ./zoneminder.nix {};
|
||||||
|
|
27
nixos/tests/zammad/default.nix
Normal file
27
nixos/tests/zammad/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import ./make-test-python.nix (
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "zammad";
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [ garbas ];
|
||||||
|
|
||||||
|
nodes.machine = {
|
||||||
|
services.zammad.enable = true;
|
||||||
|
services.zammad.secretsFile = "${./test_secrets}";
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
start_all()
|
||||||
|
machine.wait_for_unit("postgresql.service")
|
||||||
|
machine.wait_for_unit("zammad-web.service")
|
||||||
|
machine.wait_for_unit("zammad-websocket.service")
|
||||||
|
machine.wait_for_unit("zammad-scheduler.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:3000/ | grep '<title>Zammad Helpdesk</title>'"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
)
|
2
nixos/tests/zammad/test_secrets
Normal file
2
nixos/tests/zammad/test_secrets
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
PGPASSWORD=12345
|
||||||
|
SECRET_KEY_BASE=52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
|
Loading…
Reference in a new issue