summary refs log tree commit diff
path: root/nixos/tests/libreddit.nix
blob: ecf347b9e12e49c9862ae7284290634159b581d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import ./make-test-python.nix ({ lib, ... }:

{
  name = "libreddit";
  meta.maintainers = with lib.maintainers; [ fab ];

  nodes.machine = {
    services.libreddit.enable = true;
    # Test CAP_NET_BIND_SERVICE
    services.libreddit.port = 80;
  };

  testScript = ''
    machine.wait_for_unit("libreddit.service")
    machine.wait_for_open_port(80)
    # Query a page that does not require Internet access
    machine.succeed("curl --fail http://localhost:80/settings")
  '';
})