1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/tests/pyload.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
828 B
Nix
Raw Permalink Normal View History

2023-12-24 21:23:15 +00:00
import ./make-test-python.nix (
{ lib, ... }:
{
name = "pyload";
meta.maintainers = with lib.maintainers; [ ambroisie ];
2023-12-24 21:23:15 +00:00
nodes = {
machine =
{ ... }:
{
services.pyload = {
enable = true;
2023-12-24 21:23:15 +00:00
listenAddress = "0.0.0.0";
port = 9876;
};
2023-12-24 21:23:15 +00:00
networking.firewall.allowedTCPPorts = [ 9876 ];
};
2023-12-24 21:23:15 +00:00
client = { };
};
testScript = ''
start_all()
machine.wait_for_unit("pyload.service")
with subtest("Web interface accessible locally"):
machine.wait_until_succeeds("curl -fs localhost:9876")
client.wait_for_unit("network.target")
with subtest("Web interface accessible from a different machine"):
client.wait_until_succeeds("curl -fs machine:9876")
'';
}
)