2024-10-01 09:39:13 +00:00
|
|
|
import ./make-test-python.nix (
|
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
{
|
|
|
|
name = "redlib";
|
2024-10-01 09:59:05 +00:00
|
|
|
meta.maintainers = with lib.maintainers; [
|
|
|
|
soispha
|
|
|
|
Guanran928
|
|
|
|
];
|
2024-03-01 20:27:18 +00:00
|
|
|
|
2024-10-01 09:39:13 +00:00
|
|
|
nodes.machine = {
|
|
|
|
services.redlib = {
|
|
|
|
package = pkgs.redlib;
|
|
|
|
enable = true;
|
|
|
|
# Test CAP_NET_BIND_SERVICE
|
|
|
|
port = 80;
|
2024-11-22 07:42:09 +00:00
|
|
|
|
|
|
|
settings = {
|
|
|
|
REDLIB_DEFAULT_USE_HLS = true;
|
|
|
|
};
|
2024-10-01 09:39:13 +00:00
|
|
|
};
|
2024-03-01 20:27:18 +00:00
|
|
|
};
|
|
|
|
|
2024-10-01 09:39:13 +00:00
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("redlib.service")
|
|
|
|
machine.wait_for_open_port(80)
|
|
|
|
# Query a page that does not require Internet access
|
|
|
|
machine.succeed("curl --fail http://localhost:80/settings")
|
2024-11-22 07:42:09 +00:00
|
|
|
machine.succeed("curl --fail http://localhost:80/info | grep '<tr><td>Use HLS</td><td>on</td></tr>'")
|
2024-10-01 09:39:13 +00:00
|
|
|
'';
|
|
|
|
}
|
|
|
|
)
|