Set *_temp_path location to $ServRoot/#63
Conversation
lib/Test/Nginx/Util.pm
Outdated
| proxy_temp_path "$ServRoot/proxy_temp"; | ||
| fastcgi_temp_path "$ServRoot/fastcgi_temp"; | ||
| scgi_temp_path "$ServRoot/scgi_temp"; | ||
| uwsgi_temp_path "$ServRoot/uwsgi_temp"; |
There was a problem hiding this comment.
Shall we put these to the end of the http {} block? Your additions here will change the nginx.conf line numbers of the user configuration snippets, and thus will break existing tests checking line numbers of nginx.conf in some error messages.
There was a problem hiding this comment.
Another thing is that you are assuming ngx_proxy, ngx_fastcgi, ngx_scgi, and ngx_uwsgi modules are always enabled in the nginx used in testing, which is apparently not the case. Sometimes we explicitly want to test a 3rd-party module when some or all of these standard nginx modules are absent.
There was a problem hiding this comment.
Your additions here will change the nginx.conf line numbers of the user configuration snippets, and thus will break existing tests checking line numbers of nginx.conf in some error messages.
I didn’t know that, I’ve moved them to the end of http block.
Another thing is that you are assuming ngx_proxy, ngx_fastcgi, ngx_scgi, and ngx_uwsgi modules are always enabled in the nginx used in testing, which is apparently not the case.
I know, but I don’t know how to enable them conditionally only when needed. Any idea?
There was a problem hiding this comment.
@jirutka I suggest
- you use your own build of nginx or builds that are not doing clever things with those temp directory paths, or
- Use
--- main_configto specify those settings yourself in your test cases.
Linux distributions build nginx with options like `--http-client-body-temp-path=` to set default location of directories for temporary files under /var/tmp/nginx or /var/lib/nginx. The problem is, when running tests as part of the package build process, these directories are not writtable. Therefore it's needed to override location of these directories in the generated nginx.conf. Upstream-Issue: openresty#63
Linux distributions build nginx with options like
--http-client-body-temp-path=to set default location of directories for temporary files under /var/tmp/nginx or /var/lib/nginx.The problem is, when running tests as part of the package build process, these directories are not writtable. Therefore it's needed to override location of these directories in the generated nginx.conf.