mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
tt-rss : Cleanup, better tests, mark plugins as broken (#367736)
This commit is contained in:
commit
cf794a4cb2
5 changed files with 40 additions and 3 deletions
|
@ -10,13 +10,38 @@ import ../make-test-python.nix (
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHost = "localhost";
|
virtualHost = "localhost";
|
||||||
selfUrlPath = "http://localhost/";
|
selfUrlPath = "http://localhost/";
|
||||||
|
pluginPackages = with pkgs; [
|
||||||
|
tt-rss-plugin-auth-ldap
|
||||||
|
tt-rss-plugin-feediron
|
||||||
|
];
|
||||||
|
plugins = [
|
||||||
|
"auth_internal"
|
||||||
|
"feediron"
|
||||||
|
"note"
|
||||||
|
];
|
||||||
singleUserMode = true;
|
singleUserMode = true;
|
||||||
|
themePackages = with pkgs; [ tt-rss-theme-feedly ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
|
import json
|
||||||
|
import re
|
||||||
machine.wait_for_unit("tt-rss.service")
|
machine.wait_for_unit("tt-rss.service")
|
||||||
machine.succeed("curl -sSfL http://localhost/ | grep 'Tiny Tiny RSS'")
|
|
||||||
|
matches = re.search('__csrf_token = "([^"]*)"', machine.succeed("curl -sSfL --cookie cjar --cookie-jar cjar -sSfL http://localhost/"))
|
||||||
|
if matches is None:
|
||||||
|
assert False, "CSRF token not found"
|
||||||
|
csrf_token = matches.group(1)
|
||||||
|
|
||||||
|
# Ensure themes are loaded. No API found for these, so it's a crude check.
|
||||||
|
preference_page = machine.succeed("curl -sSfL --cookie cjar --cookie-jar cjar http://localhost/backend.php?op=Pref_Prefs")
|
||||||
|
assert "feedly" in preference_page
|
||||||
|
|
||||||
|
plugins = json.loads(machine.succeed(f"curl -sSfL --cookie cjar --cookie-jar cjar 'http://localhost/backend.php' -X POST --data-raw 'op=Pref_Prefs&method=getPluginsList&csrf_token={csrf_token}'"))["plugins"]
|
||||||
|
expected_plugins = ["auth_internal", "auth_ldap", "feediron", "note"];
|
||||||
|
found_plugins = [p["name"] for p in plugins if p["name"] in expected_plugins]
|
||||||
|
assert len(found_plugins) == len(expected_plugins), f"Expected plugins {expected_plugins}, found {found_plugins}"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
nixosTests,
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
}:
|
}:
|
||||||
|
@ -19,6 +20,10 @@ stdenv.mkDerivation {
|
||||||
install -D plugins/auth_ldap/init.php $out/auth_ldap/init.php
|
install -D plugins/auth_ldap/init.php $out/auth_ldap/init.php
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests = { inherit (nixosTests) tt-rss; };
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Plugin for TT-RSS to authenticate users via ldap";
|
description = "Plugin for TT-RSS to authenticate users via ldap";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
|
|
|
@ -23,6 +23,7 @@ stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
broken = true; # Plugin code does not conform to plugin API changes. See https://github.com/wltb/ff_instagram/issues/13
|
||||||
description = "Plugin for Tiny Tiny RSS that allows to fetch posts from Instagram user sites";
|
description = "Plugin for Tiny Tiny RSS that allows to fetch posts from Instagram user sites";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Plugin for Tiny Tiny RSS that allows to fetch posts from Instagram user sites.
|
Plugin for Tiny Tiny RSS that allows to fetch posts from Instagram user sites.
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
nixosTests,
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
}:
|
}:
|
||||||
|
@ -23,6 +24,10 @@ stdenv.mkDerivation rec {
|
||||||
cp -ra feedly *.css $out
|
cp -ra feedly *.css $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests = { inherit (nixosTests) tt-rss; };
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Feedly theme for Tiny Tiny RSS";
|
description = "Feedly theme for Tiny Tiny RSS";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# nixpkgs-update: no auto update
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
@ -30,13 +31,13 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit (nixosTests) tt-rss;
|
tests = { inherit (nixosTests) tt-rss; };
|
||||||
updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
|
updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Web-based news feed (RSS/Atom) aggregator";
|
description = "Web-based news feed (RSS/Atom) aggregator";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl3Plus;
|
||||||
homepage = "https://tt-rss.org";
|
homepage = "https://tt-rss.org";
|
||||||
maintainers = with maintainers; [
|
maintainers = with maintainers; [
|
||||||
gileri
|
gileri
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue