nixosTests.freshrss: handleTest -> runTest

This commit is contained in:
Sizhe Zhao 2025-06-07 21:50:04 +08:00
parent 40a27ed8e7
commit da6ecbe539
No known key found for this signature in database
GPG Key ID: ED1807251A7DA08F
8 changed files with 159 additions and 176 deletions

View File

@ -552,7 +552,7 @@ in
freenet = runTest ./freenet.nix;
freeswitch = runTest ./freeswitch.nix;
freetube = discoverTests (import ./freetube.nix);
freshrss = handleTest ./freshrss { };
freshrss = import ./freshrss { inherit runTest; };
frigate = runTest ./frigate.nix;
froide-govplan = runTest ./web-apps/froide-govplan.nix;
frp = runTest ./frp.nix;

View File

@ -1,6 +1,5 @@
import ../make-test-python.nix (
{ lib, pkgs, ... }:
{
{ lib, ... }:
{
name = "freshrss-caddy-sqlite";
meta.maintainers = with lib.maintainers; [
etu
@ -26,5 +25,4 @@ import ../make-test-python.nix (
response = machine.succeed("curl -vvv -s -H 'Host: freshrss' http://localhost:80/i/")
assert '<title>Login · FreshRSS</title>' in response, "Login page didn't load successfully"
'';
}
)
}

View File

@ -1,10 +1,10 @@
{ system, pkgs, ... }:
{ runTest }:
{
extensions = import ./extensions.nix { inherit system pkgs; };
http-auth = import ./http-auth.nix { inherit system pkgs; };
none-auth = import ./none-auth.nix { inherit system pkgs; };
pgsql = import ./pgsql.nix { inherit system pkgs; };
nginx-sqlite = import ./nginx-sqlite.nix { inherit system pkgs; };
caddy-sqlite = import ./caddy-sqlite.nix { inherit system pkgs; };
extensions = runTest ./extensions.nix;
http-auth = runTest ./http-auth.nix;
none-auth = runTest ./none-auth.nix;
pgsql = runTest ./pgsql.nix;
nginx-sqlite = runTest ./nginx-sqlite.nix;
caddy-sqlite = runTest ./caddy-sqlite.nix;
}

View File

@ -1,6 +1,4 @@
import ../make-test-python.nix (
{ lib, pkgs, ... }:
{
{
name = "freshrss-extensions";
nodes.machine =
@ -20,5 +18,4 @@ import ../make-test-python.nix (
response = machine.succeed("curl -vvv -s http://localhost:80/i/?c=extension")
assert '<span class="ext_name disabled">YouTube Video Feed</span>' in response, "Extension not present in extensions page."
'';
}
)
}

View File

@ -1,12 +1,9 @@
import ../make-test-python.nix (
{ lib, pkgs, ... }:
{
{ lib, ... }:
{
name = "freshrss-http-auth";
meta.maintainers = with lib.maintainers; [ mattchrist ];
nodes.machine =
{ pkgs, ... }:
{
nodes.machine = {
services.freshrss = {
enable = true;
baseUrl = "http://localhost";
@ -21,5 +18,4 @@ import ../make-test-python.nix (
response = machine.succeed("curl -vvv -s -H 'Host: freshrss' -H 'Remote-User: testuser' http://localhost:80/i/")
assert 'Account: testuser' in response, "http_auth method didn't work."
'';
}
)
}

View File

@ -1,6 +1,5 @@
import ../make-test-python.nix (
{ lib, pkgs, ... }:
{
{ lib, ... }:
{
name = "freshrss-nginx-sqlite";
meta.maintainers = with lib.maintainers; [
etu
@ -24,5 +23,4 @@ import ../make-test-python.nix (
response = machine.succeed("curl -vvv -s -H 'Host: freshrss' http://localhost:80/i/")
assert '<title>Login · FreshRSS</title>' in response, "Login page didn't load successfully"
'';
}
)
}

View File

@ -1,12 +1,9 @@
import ../make-test-python.nix (
{ lib, pkgs, ... }:
{
{ lib, ... }:
{
name = "freshrss-none-auth";
meta.maintainers = with lib.maintainers; [ mattchrist ];
nodes.machine =
{ pkgs, ... }:
{
nodes.machine = {
services.freshrss = {
enable = true;
baseUrl = "http://localhost";
@ -20,5 +17,4 @@ import ../make-test-python.nix (
response = machine.succeed("curl -vvv -s http://localhost:80/i/")
assert '<title> · FreshRSS</title>' in response, "FreshRSS stream page didn't load successfully"
'';
}
)
}

View File

@ -1,6 +1,5 @@
import ../make-test-python.nix (
{ lib, pkgs, ... }:
{
{ lib, ... }:
{
name = "freshrss-pgsql";
meta.maintainers = with lib.maintainers; [
etu
@ -50,5 +49,4 @@ import ../make-test-python.nix (
response = machine.succeed("curl -vvv -s -H 'Host: freshrss' http://localhost:80/i/")
assert '<title>Login · FreshRSS</title>' in response, "Login page didn't load successfully"
'';
}
)
}