about summary refs log tree commit diff
path: root/nixos/tests/zoneminder.nix
blob: a4e1a05ec0ee49b0ccf282abc1ebe2f1c09eada6 (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
import ./make-test-python.nix ({ lib, ...}:

{
  name = "zoneminder";
  meta.maintainers = with lib.maintainers; [ danielfullmer ];

  machine = { ... }:
  {
    services.zoneminder = {
      enable = true;
      database.createLocally = true;
      database.username = "zoneminder";
    };
    time.timeZone = "America/New_York";
  };

  testScript = ''
    machine.wait_for_unit("zoneminder.service")
    machine.wait_for_unit("nginx.service")
    machine.wait_for_open_port(8095)
    machine.succeed("curl --fail http://localhost:8095/")
  '';
})