Skip to content

Commit

Permalink
nixos/dae: add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Sep 2, 2023
1 parent 8f07087 commit 17e3862
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down
29 changes: 29 additions & 0 deletions nixos/tests/dae.nix
Original file line number Diff line number Diff line change
@@ -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")
'';

})

0 comments on commit 17e3862

Please sign in to comment.