1 import ../make-test-python.nix ({ lib, pkgs, ... }: {
3 meta.maintainers = with lib.maintainers; [ stunkymonkey ];
5 nodes.readonly = { pkgs, ... }: {
8 entrypoint = [ (lib.getExe pkgs.htop) ];
13 nodes.writeable = { pkgs, ... }: {
17 passwordFile = pkgs.writeText "password" "bar";
23 for machine in [readonly, writeable]:
24 machine.wait_for_unit("ttyd.service")
25 machine.wait_for_open_port(7681)
26 response = machine.succeed("curl -vvv -u foo:bar -s -H 'Host: ttyd' http://127.0.0.1:7681/")
27 assert '<title>ttyd - Terminal</title>' in response, "Page didn't load successfully"