2019-12-15 17:50:13 +03:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }:
|
2016-11-06 12:33:21 +03:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "leaps";
|
2021-01-10 22:08:30 +03:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2016-11-06 12:33:21 +03:00
|
|
|
maintainers = [ qknight ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes =
|
2020-08-02 12:25:04 +03:00
|
|
|
{
|
2016-11-06 12:33:21 +03:00
|
|
|
client = { };
|
|
|
|
|
|
|
|
server =
|
|
|
|
{ services.leaps = {
|
|
|
|
enable = true;
|
|
|
|
port = 6666;
|
|
|
|
path = "/leaps/";
|
|
|
|
};
|
|
|
|
networking.firewall.enable = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
2019-12-15 17:50:13 +03:00
|
|
|
start_all()
|
|
|
|
server.wait_for_open_port(6666)
|
|
|
|
client.wait_for_unit("network.target")
|
|
|
|
assert "leaps" in client.succeed(
|
2020-09-16 18:47:48 +03:00
|
|
|
"${pkgs.curl}/bin/curl -f http://server:6666/leaps/"
|
2019-12-15 17:50:13 +03:00
|
|
|
)
|
2016-11-06 12:33:21 +03:00
|
|
|
'';
|
|
|
|
})
|