tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixosTests.zammad: migrate to runTest
Part Of #386873
Martin Weinelt
1 year ago
2a33e128
e3c80a49
+33
-37
2 changed files
expand all
collapse all
unified
split
nixos
tests
all-tests.nix
zammad.nix
+1
-1
nixos/tests/all-tests.nix
reviewed
···
1302
1302
ydotool = handleTest ./ydotool.nix {};
1303
1303
yggdrasil = handleTest ./yggdrasil.nix {};
1304
1304
your_spotify = handleTest ./your_spotify.nix {};
1305
1305
-
zammad = handleTest ./zammad.nix {};
1305
1305
+
zammad = runTest ./zammad.nix;
1306
1306
zenohd = runTest ./zenohd.nix;
1307
1307
zeronet-conservancy = runTest ./zeronet-conservancy.nix;
1308
1308
zfs = handleTest ./zfs.nix {};
+32
-36
nixos/tests/zammad.nix
reviewed
···
1
1
-
import ./make-test-python.nix (
2
2
-
{ lib, pkgs, ... }:
1
1
+
{ lib, pkgs, ... }:
3
2
4
4
-
{
5
5
-
name = "zammad";
3
3
+
{
4
4
+
name = "zammad";
6
5
7
7
-
meta.maintainers = with lib.maintainers; [
8
8
-
taeer
9
9
-
netali
10
10
-
];
6
6
+
meta.maintainers = with lib.maintainers; [
7
7
+
taeer
8
8
+
netali
9
9
+
];
11
10
12
12
-
nodes.machine =
13
13
-
{ config, ... }:
14
14
-
{
15
15
-
virtualisation = {
16
16
-
memorySize = 2048;
17
17
-
};
11
11
+
nodes.machine = {
12
12
+
virtualisation = {
13
13
+
memorySize = 2048;
14
14
+
};
18
15
19
19
-
services.zammad.enable = true;
20
20
-
services.zammad.secretKeyBaseFile = pkgs.writeText "secret" ''
21
21
-
52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
22
22
-
'';
23
23
-
};
16
16
+
services.zammad.enable = true;
17
17
+
services.zammad.secretKeyBaseFile = pkgs.writeText "secret" ''
18
18
+
52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
19
19
+
'';
20
20
+
};
24
21
25
25
-
testScript = ''
26
26
-
start_all()
27
27
-
machine.wait_for_unit("postgresql.service")
28
28
-
machine.wait_for_unit("redis-zammad.service")
29
29
-
machine.wait_for_unit("zammad-web.service")
30
30
-
machine.wait_for_unit("zammad-websocket.service")
31
31
-
machine.wait_for_unit("zammad-worker.service")
32
32
-
# wait for zammad to fully come up
33
33
-
machine.sleep(120)
22
22
+
testScript = ''
23
23
+
start_all()
24
24
+
machine.wait_for_unit("postgresql.service")
25
25
+
machine.wait_for_unit("redis-zammad.service")
26
26
+
machine.wait_for_unit("zammad-web.service")
27
27
+
machine.wait_for_unit("zammad-websocket.service")
28
28
+
machine.wait_for_unit("zammad-worker.service")
29
29
+
# wait for zammad to fully come up
30
30
+
machine.sleep(120)
34
31
35
35
-
# without the grep the command does not produce valid utf-8 for some reason
36
36
-
with subtest("welcome screen loads"):
37
37
-
machine.succeed(
38
38
-
"curl -sSfL http://localhost:3000/ | grep '<title>Zammad Helpdesk</title>'"
39
39
-
)
40
40
-
'';
41
41
-
}
42
42
-
)
32
32
+
# without the grep the command does not produce valid utf-8 for some reason
33
33
+
with subtest("welcome screen loads"):
34
34
+
machine.succeed(
35
35
+
"curl -sSfL http://localhost:3000/ | grep '<title>Zammad Helpdesk</title>'"
36
36
+
)
37
37
+
'';
38
38
+
}