Skip to content

Commit

Permalink
omd: relax requirements for log
Browse files Browse the repository at this point in the history
This test was very specific about `LogFormat` used by the site Apache.
Currently, our packaging might provide different `LogFormat`s (likely
due to a bazel issue).

This should fix the integration test no matter which `apache-omd`
artifact is shipped by our packaging.

Change-Id: I35018527c7da0e4c3f6b3e9bd79aab86e9cf6844
  • Loading branch information
SoloJacobs committed Oct 22, 2024
1 parent 6196afb commit 41380e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/integration/omd/test_apache.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ def test_http_methods(site: Site) -> None:
assert response.status_code == 405
apache_log_file = check_output(["cat", site.path("var/log/apache/access_log")], sudo=True)
for line in apache_log_file.splitlines():
if re.match(
r'^.*"PROPFIND /\w+/check_mk/ HTTP/1.1" 405 \d+ "-" "' + user_agent + '"$', line
):
if re.match(r'^.*"PROPFIND /\w+/check_mk/ HTTP/1.1" 405 \d+ "-" "' + user_agent, line):
return
pytest.fail("Could not find regex in logfile")

0 comments on commit 41380e5

Please sign in to comment.