fix: [tests] fix path in logs_tests.sh

pull/9432/head
Christophe Vandeplas 2023-12-01 10:49:00 +01:00
parent 0dc841dc5e
commit 17d0b59909
1 changed files with 3 additions and 3 deletions

View File

@ -1,8 +1,8 @@
#!/usr/bin/env bash
ERROR_MESSAGE="Errors found in logs !"
# exit 0 of grep = match found, so we need to exit 1 on this use-case.
grep -HE -f logs_fail_regexes.txt `pwd`/app/tmp/logs/* && echo $ERROR_MESSAGE && exit 1
grep -HE -f logs_fail_regexes.txt /var/log/apache2/*.log && echo $ERROR_MESSAGE && exit 1
zgrep -HE -f logs_fail_regexes.txt /tmp/logs.json.gz && echo $ERROR_MESSAGE && exit 1
grep -HE -f tests/logs_fail_regexes.txt `pwd`/app/tmp/logs/* && echo $ERROR_MESSAGE && exit 1
grep -HE -f tests/logs_fail_regexes.txt /var/log/apache2/*.log && echo $ERROR_MESSAGE && exit 1
zgrep -HE -f tests/logs_fail_regexes.txt /tmp/logs.json.gz && echo $ERROR_MESSAGE && exit 1
# exit cleanly because grep found nothing, and did exit 1.
exit 0