depot/third_party/nixpkgs/nixos/tests/ddns-updater.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

28 lines
606 B
Nix

import ./make-test-python.nix (
{ pkgs, lib, ... }:
let
port = 6000;
in
{
name = "ddns-updater";
meta.maintainers = with lib.maintainers; [ delliott ];
nodes.machine =
{ pkgs, ... }:
{
services.ddns-updater = {
enable = true;
environment = {
LISTENING_ADDRESS = ":" + (toString port);
};
};
};
testScript = ''
machine.wait_for_unit("ddns-updater.service")
machine.wait_for_open_port(${toString port})
machine.succeed("curl --fail http://localhost:${toString port}/")
'';
}
)