mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
The default recursion limit used by Docker's archlinux:base-devel Python package becomes problematic in some cases when running tests against our FastAPI application using starlette.testclient.TestClient (aliased to fastapi.testclient.TestClient). starlette ends up with test failures because it exceeds the recursion limit, but this only happens when using the `TestClient`. When the ASGI servers are run, this is not an issue and so in that case, the recursion limit has not been touched. This change uses a `TEST_RECURSION_LIMIT` environment variable to modify the recursion limit of the FastAPI application. This variable is, by default, only supplied when running pytests in Docker, but can be force-supplied by the user. TEST_RECURSION_LIMIT=10000 has been added to `.env` and `.gitlab-ci.yml`. Signed-off-by: Kevin Morris <kevr@0cost.org>
7 lines
229 B
Bash
7 lines
229 B
Bash
FASTAPI_BACKEND="uvicorn"
|
|
FASTAPI_WORKERS=2
|
|
MARIADB_SOCKET_DIR="/var/run/mysqld/"
|
|
CGIT_CLONE_PREFIX_PHP=https://localhost:8443
|
|
CGIT_CLONE_PREFIX_FASTAPI=https://localhost:8444
|
|
GIT_DATA_DIR="./aur.git/"
|
|
TEST_RECURSION_LIMIT=10000
|