summary refs log tree commit diff
path: root/nixos/tests/etesync-dav.nix
blob: 6a747e23f76f6766fb37a71e20ae1190719c1e9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import ./make-test-python.nix ({ pkgs, ... }: {

  name = "etesync-dav";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ _3699n ];
  };

  machine = { config, pkgs, ... }: {
      environment.systemPackages = [ pkgs.curl pkgs.etesync-dav ];
  };

  testScript =
    ''
      machine.wait_for_unit("multi-user.target")
      machine.succeed("etesync-dav --version")
      machine.execute("etesync-dav >&2 &")
      machine.wait_for_open_port(37358)
      with subtest("Check that the web interface is accessible"):
          assert "Add User" in machine.succeed("curl -s http://localhost:37358/.web/add/")
    '';
})