Skip to content

Commit

Permalink
Make globals more readable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimf5 committed Dec 6, 2024
1 parent 32f2115 commit cae3dc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ def nginx_config(request, pytestconfig, testdir, logger):
tmpl = jinja2.Environment().from_string(request.module.NGINX_CONFIG)
params = request.param
params["globals"] = (
f"pid {testdir}/nginx.pid;\nerror_log {testdir}/error.log notice;\n"
f"pid {testdir}/nginx.pid;\n"
+ f"error_log {testdir}/error.log notice;\n"
+ f"load_module {os.path.abspath(pytestconfig.option.module)};\n"
+ pytestconfig.option.globals
)
params["http_globals"] = f"root {testdir};\naccess_log off;\n"
params["http_globals"] = f"root {testdir};\n" + "access_log off;\n"
conf = tmpl.render(params)
logger.debug(conf)
return conf
Expand Down

0 comments on commit cae3dc3

Please sign in to comment.