From f561e395bd8b59aff8fe04df30692c4ae9b2bf83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 17 Sep 2023 20:04:28 +0200 Subject: [PATCH] nixos/tests/deconz: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/deconz.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 nixos/tests/deconz.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 2d774bc19579..36c08252b7ae 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -216,6 +216,7 @@ in { darling = handleTest ./darling.nix {}; dae = handleTest ./dae.nix {}; dconf = handleTest ./dconf.nix {}; + deconz = handleTest ./deconz.nix {}; deepin = handleTest ./deepin.nix {}; deluge = handleTest ./deluge.nix {}; dendrite = handleTest ./matrix/dendrite.nix {}; diff --git a/nixos/tests/deconz.nix b/nixos/tests/deconz.nix new file mode 100644 index 000000000000..cbe721ba4925 --- /dev/null +++ b/nixos/tests/deconz.nix @@ -0,0 +1,28 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: +let + httpPort = 800; +in +{ + name = "deconz"; + + meta.maintainers = with lib.maintainers; [ + bjornfor + ]; + + nodes.machine = { config, pkgs, lib, ... }: { + nixpkgs.config.allowUnfree = true; + services.deconz = { + enable = true; + inherit httpPort; + extraArgs = [ + "--dbg-err=2" + "--dbg-info=2" + ]; + }; + }; + + testScript = '' + machine.wait_for_unit("deconz.service") + machine.succeed("curl -sfL http://localhost:${toString httpPort}") + ''; +})