2021-04-18 23:05:25 +00:00
|
|
|
import ./make-test-python.nix ({ lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "libreddit";
|
2023-04-30 14:26:17 +00:00
|
|
|
meta.maintainers = with lib.maintainers; [ fab ];
|
2021-04-18 23:05:25 +00:00
|
|
|
|
2021-08-13 13:47:24 +00:00
|
|
|
nodes.machine = {
|
|
|
|
services.libreddit.enable = true;
|
|
|
|
# Test CAP_NET_BIND_SERVICE
|
|
|
|
services.libreddit.port = 80;
|
|
|
|
};
|
2021-04-18 23:05:25 +00:00
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("libreddit.service")
|
2022-06-11 12:22:53 +00:00
|
|
|
machine.wait_for_open_port(80)
|
2021-08-13 13:47:24 +00:00
|
|
|
# Query a page that does not require Internet access
|
|
|
|
machine.succeed("curl --fail http://localhost:80/settings")
|
2021-04-18 23:05:25 +00:00
|
|
|
'';
|
|
|
|
})
|