1{ lib, pkgs, ... }:
2
3{
4 name = "zammad";
5
6 meta.maintainers = with lib.maintainers; [
7 taeer
8 netali
9 ];
10
11 nodes.machine = {
12 virtualisation = {
13 memorySize = 2048;
14 };
15
16 services.zammad.enable = true;
17 services.zammad.secretKeyBaseFile = pkgs.writeText "secret" ''
18 52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
19 '';
20 };
21
22 testScript = ''
23 start_all()
24 machine.wait_for_unit("postgresql.target")
25 machine.wait_for_unit("redis-zammad.service")
26 machine.wait_for_unit("zammad-web.service")
27 machine.wait_for_unit("zammad-websocket.service")
28 machine.wait_for_unit("zammad-worker.service")
29 # wait for zammad to fully come up
30 machine.sleep(120)
31
32 # without the grep the command does not produce valid utf-8 for some reason
33 with subtest("welcome screen loads"):
34 machine.succeed(
35 "curl -sSfL http://localhost:3000/ | grep '<title>Zammad Helpdesk</title>'"
36 )
37 '';
38}