1 import ./make-test-python.nix ({ lib, pkgs, ... }: {
3 meta.maintainers = with lib.maintainers; [ etu stunkymonkey ];
5 nodes.machine = { pkgs, ... }: {
8 baseUrl = "http://localhost";
9 passwordFile = pkgs.writeText "password" "secret";
10 dataDir = "/srv/freshrss";
15 passFile = pkgs.writeText "db-password" "db-secret";
19 services.postgresql = {
21 ensureDatabases = [ "freshrss" ];
25 ensureDBOwnership = true;
28 initialScript = pkgs.writeText "postgresql-password" ''
29 CREATE ROLE freshrss WITH LOGIN PASSWORD 'db-secret' CREATEDB;
33 systemd.services."freshrss-config" = {
34 requires = [ "postgresql.service" ];
35 after = [ "postgresql.service" ];
40 machine.wait_for_unit("multi-user.target")
41 machine.wait_for_open_port(5432)
42 machine.wait_for_open_port(80)
43 response = machine.succeed("curl -vvv -s -H 'Host: freshrss' http://127.0.0.1:80/i/")
44 assert '<title>Login ยท FreshRSS</title>' in response, "Login page didn't load successfully"