about summary refs log tree commit diff
path: root/nixos/tests/freshrss-none-auth.nix
diff options
context:
space:
mode:
authorMatt Christ <matt@christ.systems>2024-04-14 09:10:51 -0500
committerMatt Christ <matt@christ.systems>2024-04-16 16:48:41 -0500
commit90e673b1b8e32cd66c7311cb9036a2d2cf32ee4a (patch)
tree6dd4e5b95cdfd7c6e3af1fb31692a08e203ac2f4 /nixos/tests/freshrss-none-auth.nix
parentd3644d8d681f7ffa10c0c1cf4541df0280a8216e (diff)
nixos/freshrss: fix startup when authType = "none"
Prior to this patch, FreshRSS fails to load with an initial
`authType = "none"` setting, instead providing an error:
"Error during context user init!"

To fix this, this patch changes the freshrss-config service to
setup the initial `defaultUser` when `authType = "none"`
is configured.
Diffstat (limited to 'nixos/tests/freshrss-none-auth.nix')
-rw-r--r--nixos/tests/freshrss-none-auth.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/tests/freshrss-none-auth.nix b/nixos/tests/freshrss-none-auth.nix
new file mode 100644
index 0000000000000..fd63470386a05
--- /dev/null
+++ b/nixos/tests/freshrss-none-auth.nix
@@ -0,0 +1,19 @@
+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"
+  '';
+})