nixos/tests/freshrss: test extensions

This commit is contained in:
Felix Buehler 2024-07-01 20:46:05 +02:00
parent bb33682f3a
commit 7c8f7bc948
3 changed files with 21 additions and 1 deletions

View File

@ -337,6 +337,7 @@ in {
freenet = handleTest ./freenet.nix {};
freeswitch = handleTest ./freeswitch.nix {};
freetube = discoverTests (import ./freetube.nix);
freshrss-extensions = handleTest ./freshrss-extensions.nix {};
freshrss-sqlite = handleTest ./freshrss-sqlite.nix {};
freshrss-pgsql = handleTest ./freshrss-pgsql.nix {};
freshrss-http-auth = handleTest ./freshrss-http-auth.nix {};

View File

@ -0,0 +1,19 @@
import ./make-test-python.nix ({ lib, pkgs, ... }: {
name = "freshrss";
nodes.machine = { pkgs, ... }: {
services.freshrss = {
enable = true;
baseUrl = "http://localhost";
authType = "none";
extensions = [ pkgs.freshrss-extensions.youtube ];
};
};
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/?c=extension")
assert '<span class="ext_name disabled">YouTube Video Feed</span>' in response, "Extension not present in extensions page."
'';
})

View File

@ -41,7 +41,7 @@ stdenvNoCC.mkDerivation rec {
'';
passthru.tests = {
inherit (nixosTests) freshrss-sqlite freshrss-pgsql freshrss-http-auth freshrss-none-auth;
inherit (nixosTests) freshrss-sqlite freshrss-pgsql freshrss-http-auth freshrss-none-auth freshrss-extensions;
};
meta = with lib; {