1import ./make-test-python.nix (
2 { pkgs, lib, ... }:
3 let
4 port = 6000;
5 in
6 {
7 name = "ddns-updater";
8
9 meta.maintainers = with lib.maintainers; [ delliott ];
10
11 nodes.machine =
12 { pkgs, ... }:
13 {
14 services.ddns-updater = {
15 enable = true;
16 environment = {
17 LISTENING_ADDRESS = ":" + (toString port);
18 };
19 };
20 };
21
22 testScript = ''
23 machine.wait_for_unit("ddns-updater.service")
24 machine.wait_for_open_port(${toString port})
25 machine.succeed("curl --fail http://localhost:${toString port}/")
26 '';
27 }
28)