summary refs log tree commit diff
path: root/nixos/tests/mxisd.nix
blob: b2b60db4d8227515d9d20d4b3e64b4f24abd9a9d (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
30
import ./make-test-python.nix ({ pkgs, ... } : {

  name = "mxisd";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ mguentner ];
  };

  nodes = {
    server_mxisd = args : {
      services.mxisd.enable = true;
      services.mxisd.matrix.domain = "example.org";
    };

    server_ma1sd = args : {
      services.mxisd.enable = true;
      services.mxisd.matrix.domain = "example.org";
      services.mxisd.package = pkgs.ma1sd;
    };
  };

  testScript = ''
    start_all()
    server_mxisd.wait_for_unit("mxisd.service")
    server_mxisd.wait_for_open_port(8090)
    server_mxisd.succeed("curl -Ssf 'http://127.0.0.1:8090/_matrix/identity/api/v1'")
    server_ma1sd.wait_for_unit("mxisd.service")
    server_ma1sd.wait_for_open_port(8090)
    server_ma1sd.succeed("curl -Ssf 'http://127.0.0.1:8090/_matrix/identity/api/v1'")
  '';
})