Unverified Commit 671372c8 authored by Felix Bühler's avatar Felix Bühler Committed by GitHub
Browse files

Merge pull request #304052 from mattchrist/freshrss-authtype-none

nixos/freshrss: fix startup when authType = "none"
parents dd1ddc55 90e673b1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -268,11 +268,11 @@ in

          script =
            let
              userScriptArgs = ''--user ${cfg.defaultUser} --password "$(cat ${cfg.passwordFile})"'';
              updateUserScript = optionalString (cfg.authType == "form") ''
              userScriptArgs = ''--user ${cfg.defaultUser} ${optionalString (cfg.authType == "form") ''--password "$(cat ${cfg.passwordFile})"''}'';
              updateUserScript = optionalString (cfg.authType == "form" || cfg.authType == "none") ''
                ./cli/update-user.php ${userScriptArgs}
              '';
              createUserScript = optionalString (cfg.authType == "form") ''
              createUserScript = optionalString (cfg.authType == "form" || cfg.authType == "none") ''
                ./cli/create-user.php ${userScriptArgs}
              '';
            in
+1 −0
Original line number Diff line number Diff line
@@ -330,6 +330,7 @@ in {
  freshrss-sqlite = handleTest ./freshrss-sqlite.nix {};
  freshrss-pgsql = handleTest ./freshrss-pgsql.nix {};
  freshrss-http-auth = handleTest ./freshrss-http-auth.nix {};
  freshrss-none-auth = handleTest ./freshrss-none-auth.nix {};
  frigate = handleTest ./frigate.nix {};
  frp = handleTest ./frp.nix {};
  frr = handleTest ./frr.nix {};
+19 −0
Original line number Diff line number Diff line
import ./make-test-python.nix ({ lib, pkgs, ... }: {
  name = "freshrss";
  meta.maintainers = with lib.maintainers; [ mattchrist ];

  nodes.machine = { pkgs, ... }: {
    services.freshrss = {
      enable = true;
      baseUrl = "http://localhost";
      authType = "none";
    };
  };

  testScript = ''
    machine.wait_for_unit("multi-user.target")
    machine.wait_for_open_port(80)
    response = machine.succeed("curl -vvv -s http://127.0.0.1:80/i/")
    assert '<title>Main stream · FreshRSS</title>' in response, "FreshRSS stream page didn't load successfully"
  '';
})
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ stdenvNoCC.mkDerivation rec {
  };

  passthru.tests = {
    inherit (nixosTests) freshrss-sqlite freshrss-pgsql freshrss-http-auth;
    inherit (nixosTests) freshrss-sqlite freshrss-pgsql freshrss-http-auth freshrss-none-auth;
  };

  buildInputs = [ php ];