1import ./make-test-python.nix ({ pkgs, ... }: {
2 name = "icingaweb2";
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ das_j ];
5 };
6
7 nodes = {
8 icingaweb2 = { config, pkgs, ... }: {
9 services.icingaweb2 = {
10 enable = true;
11
12 modulePackages = with pkgs.icingaweb2Modules; {
13 particles = theme-particles;
14 spring = theme-spring;
15 };
16
17 modules = {
18 doc.enable = true;
19 migrate.enable = true;
20 setup.enable = true;
21 test.enable = true;
22 translation.enable = true;
23 };
24
25 generalConfig = {
26 global = {
27 module_path = "${pkgs.icingaweb2}/modules";
28 };
29 };
30
31 authentications = {
32 icingaweb = {
33 backend = "external";
34 };
35 };
36
37 groupBackends = {
38 icingaweb = {
39 backend = "db";
40 resource = "icingaweb_db";
41 };
42 };
43
44 resources = {
45 # Not used, so no DB server needed
46 icingaweb_db = {
47 type = "db";
48 db = "mysql";
49 host = "localhost";
50 username = "icingaweb2";
51 password = "icingaweb2";
52 dbname = "icingaweb2";
53 };
54 };
55
56 roles = {
57 Administrators = {
58 users = "*";
59 permissions = "*";
60 };
61 };
62 };
63 };
64 };
65
66 testScript = ''
67 start_all()
68 icingaweb2.wait_for_unit("multi-user.target")
69 icingaweb2.succeed("curl -sSf http://icingaweb2/authentication/login")
70 '';
71})