summary refs log tree commit diff
path: root/nixos/tests/thelounge.nix
blob: e9b85685bf2dbb5707ab43ab7516c9a88ae0c738 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import ./make-test-python.nix {
  nodes = {
    private = { config, pkgs, ... }: {
      services.thelounge = {
        enable = true;
        plugins = [ pkgs.theLoungePlugins.themes.solarized ];
      };
    };

    public = { config, pkgs, ... }: {
      services.thelounge = {
        enable = true;
        public = true;
      };
    };
  };

  testScript = ''
    start_all()

    for machine in machines:
      machine.wait_for_unit("thelounge.service")
      machine.wait_for_open_port(9000)

    private.wait_until_succeeds("journalctl -u thelounge.service | grep thelounge-theme-solarized")
    private.wait_until_succeeds("journalctl -u thelounge.service | grep 'in private mode'")
    public.wait_until_succeeds("journalctl -u thelounge.service | grep 'in public mode'")
  '';
}