Skip to content

Commit d3c867d

Browse files
committed
test: fix nginx temp path for non-root user
Error: $ ./test/wait-for-hawkbit-online && dbus-run-session -- pytest -v -o log_cli=true test/test_download.py [...] test/test_download.py::test_download_too_slow -------------------------------------------------------- live log call -------------------------------------------------------- INFO nginx running: nginx -c /tmp/pytest-of-thibaud/pytest-8/nginx0/nginx.conf -p . INFO nginx nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) INFO nginx 2024/06/28 15:41:56 [emerg] 1450257#1450257: mkdir() "/var/lib/nginx/tmp/client_body" failed (13: Permission denied) SKIPPED (nginx failed, use -s to see logs) [ 42%] test/test_download.py::test_download_partials_without_resume ------------------------------------------------------- live log setup -------------------------------------------------------- INFO nginx running: nginx -c /tmp/pytest-of-thibaud/pytest-8/nginx1/nginx.conf -p . INFO nginx nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) INFO nginx 2024/06/28 15:41:56 [emerg] 1450258#1450258: mkdir() "/var/lib/nginx/tmp/client_body" failed (13: Permission denied) SKIPPED (nginx failed, use -s to see logs) [ 57%] test/test_download.py::test_download_partials_with_resume SKIPPED (nginx failed, use -s to see logs) [ 71%] test/test_download.py::test_download_slow_with_resume -------------------------------------------------------- live log call -------------------------------------------------------- INFO nginx running: nginx -c /tmp/pytest-of-thibaud/pytest-8/nginx2/nginx.conf -p . INFO nginx nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) INFO nginx 2024/06/28 15:41:56 [emerg] 1450259#1450259: mkdir() "/var/lib/nginx/tmp/client_body" failed (13: Permission denied) SKIPPED (nginx failed, use -s to see logs)
1 parent 2757db4 commit d3c867d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/conftest.py

+6
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,12 @@ def nginx_config(tmp_path_factory):
242242
243243
http {{
244244
access_log /dev/null;
245+
# See part "Running nginx as a non-root user" of https://hub.docker.com/_/nginx
246+
client_body_temp_path /tmp/client_temp;
247+
proxy_temp_path /tmp/proxy_temp_path;
248+
fastcgi_temp_path /tmp/fastcgi_temp;
249+
uwsgi_temp_path /tmp/uwsgi_temp;
250+
scgi_temp_path /tmp/scgi_temp;
245251
246252
server {{
247253
listen {port};

0 commit comments

Comments
 (0)