1import ../make-test-python.nix (
2 { lib, pkgs, ... }:
3 {
4 name = "freshrss-http-auth";
5 meta.maintainers = with lib.maintainers; [ mattchrist ];
6
7 nodes.machine =
8 { pkgs, ... }:
9 {
10 services.freshrss = {
11 enable = true;
12 baseUrl = "http://localhost";
13 dataDir = "/srv/freshrss";
14 authType = "http_auth";
15 };
16 };
17
18 testScript = ''
19 machine.wait_for_unit("multi-user.target")
20 machine.wait_for_open_port(80)
21 response = machine.succeed("curl -vvv -s -H 'Host: freshrss' -H 'Remote-User: testuser' http://localhost:80/i/")
22 assert 'Account: testuser' in response, "http_auth method didn't work."
23 '';
24 }
25)