Skip to content
Snippets Groups Projects
Commit c5d9d748 authored by nimrod's avatar nimrod
Browse files

- Log to syslog only if the version supports it.

parent db0e2b5f
No related branches found
No related tags found
No related merge requests found
{% if nginx["version"]|version_compare("1.7.11", ">=") %}
access_log {{ nginx_access_log }}; access_log {{ nginx_access_log }};
error_log {{ nginx_error_log }}; error_log {{ nginx_error_log }};
{% endif %}
...@@ -23,15 +23,6 @@ def test_nginx_include_directive(File, directive): ...@@ -23,15 +23,6 @@ def test_nginx_include_directive(File, directive):
assert directive in File('/etc/nginx/nginx.conf').content_string assert directive in File('/etc/nginx/nginx.conf').content_string
log_directives = ['access_log syslog:server=127.0.0.1;',
'error_log syslog:server=127.0.0.1;']
@pytest.mark.parametrize('directive', log_directives)
def test_nginx_log_directive(File, directive):
assert directive in File('/etc/nginx/conf.d/log.conf').content_string
def test_nginx_config(File, Command, Sudo): def test_nginx_config(File, Command, Sudo):
with Sudo(): with Sudo():
assert Command('nginx -t').rc == 0 assert Command('nginx -t').rc == 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment