mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 18:12:34 +09:00
parent
e3c80a49c8
commit
2a33e128e1
2 changed files with 34 additions and 38 deletions
|
@ -1302,7 +1302,7 @@ in {
|
|||
ydotool = handleTest ./ydotool.nix {};
|
||||
yggdrasil = handleTest ./yggdrasil.nix {};
|
||||
your_spotify = handleTest ./your_spotify.nix {};
|
||||
zammad = handleTest ./zammad.nix {};
|
||||
zammad = runTest ./zammad.nix;
|
||||
zenohd = runTest ./zenohd.nix;
|
||||
zeronet-conservancy = runTest ./zeronet-conservancy.nix;
|
||||
zfs = handleTest ./zfs.nix {};
|
||||
|
|
|
@ -1,42 +1,38 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "zammad";
|
||||
{
|
||||
name = "zammad";
|
||||
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
taeer
|
||||
netali
|
||||
];
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
taeer
|
||||
netali
|
||||
];
|
||||
|
||||
nodes.machine =
|
||||
{ config, ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
memorySize = 2048;
|
||||
};
|
||||
nodes.machine = {
|
||||
virtualisation = {
|
||||
memorySize = 2048;
|
||||
};
|
||||
|
||||
services.zammad.enable = true;
|
||||
services.zammad.secretKeyBaseFile = pkgs.writeText "secret" ''
|
||||
52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
|
||||
'';
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
machine.wait_for_unit("redis-zammad.service")
|
||||
machine.wait_for_unit("zammad-web.service")
|
||||
machine.wait_for_unit("zammad-websocket.service")
|
||||
machine.wait_for_unit("zammad-worker.service")
|
||||
# wait for zammad to fully come up
|
||||
machine.sleep(120)
|
||||
|
||||
# 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>'"
|
||||
)
|
||||
services.zammad.enable = true;
|
||||
services.zammad.secretKeyBaseFile = pkgs.writeText "secret" ''
|
||||
52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
|
||||
'';
|
||||
}
|
||||
)
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
machine.wait_for_unit("redis-zammad.service")
|
||||
machine.wait_for_unit("zammad-web.service")
|
||||
machine.wait_for_unit("zammad-websocket.service")
|
||||
machine.wait_for_unit("zammad-worker.service")
|
||||
# wait for zammad to fully come up
|
||||
machine.sleep(120)
|
||||
|
||||
# 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>'"
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue