2024-03-01 20:27:18 +00:00
|
|
|
import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
|
|
|
name = "redlib";
|
|
|
|
meta.maintainers = with lib.maintainers; [ soispha ];
|
|
|
|
|
|
|
|
nodes.machine = {
|
2024-07-17 15:07:18 +01:00
|
|
|
services.redlib = {
|
2024-03-01 20:27:18 +00:00
|
|
|
package = pkgs.redlib;
|
|
|
|
enable = true;
|
|
|
|
# Test CAP_NET_BIND_SERVICE
|
|
|
|
port = 80;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2024-07-17 15:07:18 +01:00
|
|
|
machine.wait_for_unit("redlib.service")
|
2024-03-01 20:27:18 +00:00
|
|
|
machine.wait_for_open_port(80)
|
|
|
|
# Query a page that does not require Internet access
|
|
|
|
machine.succeed("curl --fail http://localhost:80/settings")
|
|
|
|
'';
|
|
|
|
})
|