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