Files
tasklist/test/test.nix
kalipso 895c19269b Revert 1 commits
cd5c0f1 'try fix actions kvm error'
2024-10-23 12:20:09 +02:00

22 lines
653 B
Nix

# ./tests/hello-world-server.nix
(import ./lib.nix) {
name = "from-nixos";
nodes = {
# `self` here is set by using specialArgs in `lib.nix`
node1 = { self, pkgs, ... }: {
imports = [ self.nixosModules.malobeo-tasklist ];
services.malobeo-tasklist.enable = true;
environment.systemPackages = [ pkgs.curl ];
};
};
testScript = ''
start_all() # wait for our service to start
node1.wait_for_unit("malobeo-tasklist")
output = node1.succeed("curl localhost:8080")
# Check if our webserver returns the expected result
assert "tasklist" in output, f"'{output}' does not contain 'Hello world'"
'';
}