nixpkgs/nixos/tests/zammad.nix

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

43 lines
1.2 KiB
Nix
Raw Normal View History

2022-02-16 00:49:51 -05:00
import ./make-test-python.nix (
{ lib, pkgs, ... }:
2022-02-02 06:23:43 -05:00
2022-02-16 16:50:22 -05:00
{
name = "zammad";
2022-02-02 06:23:43 -05:00
2023-12-03 11:13:32 +01:00
meta.maintainers = with lib.maintainers; [
taeer
netali
];
2022-02-02 06:23:43 -05:00
2022-02-22 05:37:03 -05:00
nodes.machine =
{ config, ... }:
{
virtualisation = {
memorySize = 2048;
};
2022-02-16 16:50:22 -05:00
services.zammad.enable = true;
services.zammad.secretKeyBaseFile = pkgs.writeText "secret" ''
52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
2022-02-02 06:23:43 -05:00
'';
2022-02-16 16:50:22 -05:00
};
testScript = ''
start_all()
machine.wait_for_unit("postgresql.service")
2023-12-03 11:13:32 +01:00
machine.wait_for_unit("redis-zammad.service")
2022-02-16 16:50:22 -05:00
machine.wait_for_unit("zammad-web.service")
machine.wait_for_unit("zammad-websocket.service")
2023-12-03 11:13:32 +01:00
machine.wait_for_unit("zammad-worker.service")
2022-02-22 05:37:03 -05:00
# wait for zammad to fully come up
machine.sleep(120)
2022-02-16 16:50:22 -05:00
# 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>'"
)
'';
}
2022-02-02 06:23:43 -05:00
)