nixos/dae: add basic test

This commit is contained in:
oluceps 2023-09-03 02:30:30 +08:00
parent 8f070876da
commit 17e386205b
No known key found for this signature in database
2 changed files with 30 additions and 0 deletions

View file

@ -210,6 +210,7 @@ in {
custom-ca = handleTest ./custom-ca.nix {};
croc = handleTest ./croc.nix {};
darling = handleTest ./darling.nix {};
dae = handleTest ./dae.nix {};
dconf = handleTest ./dconf.nix {};
deepin = handleTest ./deepin.nix {};
deluge = handleTest ./deluge.nix {};

29
nixos/tests/dae.nix Normal file
View file

@ -0,0 +1,29 @@
import ./make-test-python.nix ({ lib, pkgs, ... }: {
name = "dae";
meta = {
maintainers = with lib.maintainers; [ oluceps ];
};
nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.curl ];
services.nginx = {
enable = true;
statusPage = true;
};
services.dae = {
enable = true;
};
};
testScript = ''
machine.wait_for_unit("nginx.service")
machine.wait_for_unit("dae.service")
machine.wait_for_open_port(80)
machine.succeed("curl --fail --max-time 10 http://localhost")
'';
})