nixosTests.redlib: test settings mechanic

This commit is contained in:
Guanran Wang 2024-11-22 15:42:09 +08:00
parent 4a0893c186
commit 0f77709e0f
No known key found for this signature in database
GPG Key ID: 91F97D9ED12639CF

View File

@ -13,6 +13,10 @@ import ./make-test-python.nix (
enable = true;
# Test CAP_NET_BIND_SERVICE
port = 80;
settings = {
REDLIB_DEFAULT_USE_HLS = true;
};
};
};
@ -21,6 +25,7 @@ import ./make-test-python.nix (
machine.wait_for_open_port(80)
# Query a page that does not require Internet access
machine.succeed("curl --fail http://localhost:80/settings")
machine.succeed("curl --fail http://localhost:80/info | grep '<tr><td>Use HLS</td><td>on</td></tr>'")
'';
}
)