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" ];
26 "DATABASE freshrss" = "ALL PRIVILEGES";
30 initialScript = pkgs.writeText "postgresql-password" ''
31 CREATE ROLE freshrss WITH LOGIN PASSWORD 'db-secret' CREATEDB;
35 systemd.services."freshrss-config" = {
36 requires = [ "postgresql.service" ];
37 after = [ "postgresql.service" ];
42 machine.wait_for_unit("multi-user.target")
43 machine.wait_for_open_port(5432)
44 machine.wait_for_open_port(80)
45 response = machine.succeed("curl -vvv -s -H 'Host: freshrss' http://127.0.0.1:80/i/")
46 assert '<title>Login ยท FreshRSS</title>' in response, "Login page didn't load successfully"