Loading nixos/tests/lemmy.nix +3 −3 Original line number Diff line number Diff line Loading @@ -51,8 +51,8 @@ in with subtest("the backend starts and responds"): server.wait_for_open_port(${toString backendPort}) # wait until succeeds, it just needs few seconds for migrations, but lets give it 10s max server.wait_until_succeeds("curl --fail localhost:${toString backendPort}/api/v3/site", 10) # wait until succeeds, it just needs few seconds for migrations, but lets give it 50s max server.wait_until_succeeds("curl --fail localhost:${toString backendPort}/api/v3/site", 50) with subtest("the UI starts and responds"): server.wait_for_unit("lemmy-ui.service") Loading @@ -77,7 +77,7 @@ in server.execute("systemctl stop lemmy-ui.service") def assert_http_code(url, expected_http_code, extra_curl_args=""): _, http_code = server.execute(f'curl --silent -o /dev/null {extra_curl_args} --fail --write-out "%{{http_code}}" {url}') _, http_code = server.execute(f'curl --location --silent -o /dev/null {extra_curl_args} --fail --write-out "%{{http_code}}" {url}') assert http_code == str(expected_http_code), f"expected http code {expected_http_code}, got {http_code}" # Caddy responds with HTTP code 502 if it cannot handle the requested path Loading pkgs/servers/web-apps/lemmy/ui.nix +9 −4 Original line number Diff line number Diff line Loading @@ -2,13 +2,10 @@ , stdenvNoCC , libsass , nodejs , python3 , pkg-config , pnpm_9 , fetchFromGitHub , nixosTests , vips , nodePackages }: let Loading Loading @@ -66,6 +63,14 @@ stdenvNoCC.mkDerivation (finalAttrs: { cp -R ./node_modules $out ''; preFixup = '' find $out -name libvips-cpp.so.42 -print0 | while read -d $'\0' libvips; do echo replacing libvips at $libvips rm $libvips ln -s ${lib.getLib vips}/lib/libvips-cpp.so.42 $libvips done ''; distPhase = "true"; Loading Loading
nixos/tests/lemmy.nix +3 −3 Original line number Diff line number Diff line Loading @@ -51,8 +51,8 @@ in with subtest("the backend starts and responds"): server.wait_for_open_port(${toString backendPort}) # wait until succeeds, it just needs few seconds for migrations, but lets give it 10s max server.wait_until_succeeds("curl --fail localhost:${toString backendPort}/api/v3/site", 10) # wait until succeeds, it just needs few seconds for migrations, but lets give it 50s max server.wait_until_succeeds("curl --fail localhost:${toString backendPort}/api/v3/site", 50) with subtest("the UI starts and responds"): server.wait_for_unit("lemmy-ui.service") Loading @@ -77,7 +77,7 @@ in server.execute("systemctl stop lemmy-ui.service") def assert_http_code(url, expected_http_code, extra_curl_args=""): _, http_code = server.execute(f'curl --silent -o /dev/null {extra_curl_args} --fail --write-out "%{{http_code}}" {url}') _, http_code = server.execute(f'curl --location --silent -o /dev/null {extra_curl_args} --fail --write-out "%{{http_code}}" {url}') assert http_code == str(expected_http_code), f"expected http code {expected_http_code}, got {http_code}" # Caddy responds with HTTP code 502 if it cannot handle the requested path Loading
pkgs/servers/web-apps/lemmy/ui.nix +9 −4 Original line number Diff line number Diff line Loading @@ -2,13 +2,10 @@ , stdenvNoCC , libsass , nodejs , python3 , pkg-config , pnpm_9 , fetchFromGitHub , nixosTests , vips , nodePackages }: let Loading Loading @@ -66,6 +63,14 @@ stdenvNoCC.mkDerivation (finalAttrs: { cp -R ./node_modules $out ''; preFixup = '' find $out -name libvips-cpp.so.42 -print0 | while read -d $'\0' libvips; do echo replacing libvips at $libvips rm $libvips ln -s ${lib.getLib vips}/lib/libvips-cpp.so.42 $libvips done ''; distPhase = "true"; Loading