diff options
author | Brian Leung <leungbk@posteo.net> | 2022-09-09 01:18:41 -0700 |
---|---|---|
committer | Yt <happysalada@proton.me> | 2022-09-09 05:18:02 -0400 |
commit | b7f19802af19ad92ce997150153d48ec5a305296 (patch) | |
tree | a3496b1f43f24acbebabbe6fb28ef4e48ff72a16 /nixos/tests | |
parent | c5cb6985ccb061c40ad2764667ca5f26e30c8ab6 (diff) | |
download | nixpkgs-b7f19802af19ad92ce997150153d48ec5a305296.tar nixpkgs-b7f19802af19ad92ce997150153d48ec5a305296.tar.gz nixpkgs-b7f19802af19ad92ce997150153d48ec5a305296.tar.bz2 nixpkgs-b7f19802af19ad92ce997150153d48ec5a305296.tar.lz nixpkgs-b7f19802af19ad92ce997150153d48ec5a305296.tar.xz nixpkgs-b7f19802af19ad92ce997150153d48ec5a305296.tar.zst nixpkgs-b7f19802af19ad92ce997150153d48ec5a305296.zip |
services/lemmy: fix /feeds/* and /nodeinfo/* API endpoints
Co-authored-by: Shahar Dawn Or <mightyiampresence@gmail.com> Co-authored-by: Matthias Meschede <MMesch@users.noreply.github.com> Co-authored-by: a-kenji <aks.kenji@protonmail.com> Co-authored-by: Ctem <c@ctem.me> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/lemmy.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/tests/lemmy.nix b/nixos/tests/lemmy.nix index 5436d0b300c..543bd2ce57a 100644 --- a/nixos/tests/lemmy.nix +++ b/nixos/tests/lemmy.nix @@ -23,6 +23,13 @@ in hostname = "http://${lemmyNodeName}"; port = backendPort; database.createLocally = true; + # Without setup, the /feeds/* and /nodeinfo/* API endpoints won't return 200 + setup = { + admin_username = "mightyiam"; + admin_password = "ThisIsWhatIUseEverywhereTryIt"; + site_name = "Lemmy FTW"; + admin_email = "mightyiam@example.com"; + }; }; caddy.enable = true; }; @@ -76,7 +83,8 @@ in # No path can return 200 until after we upload an image to pict-rs assert_http_code("${lemmyNodeName}/pictrs/", 404) - # The paths `/feeds/*` and `/nodeinfo/*` are not tested because they seem to be misconfigured + assert_http_code("${lemmyNodeName}/feeds/all.xml", 200) + assert_http_code("${lemmyNodeName}/nodeinfo/2.0.json", 200) assert_http_code("${lemmyNodeName}/some-other-made-up-path/", 404, "-X POST") assert_http_code("${lemmyNodeName}/some-other-path", 404, "-H 'Accept: application/activity+json'") |