Commit 46f8434c authored by Vitaly Lipatov's avatar Vitaly Lipatov

tests: isolate invalid unban CLI check

parent d3099e8b
...@@ -10,7 +10,7 @@ find gateway prod-server ban-internal-server -type f -name '*.py' -exec \ ...@@ -10,7 +10,7 @@ find gateway prod-server ban-internal-server -type f -name '*.py' -exec \
find ban-server -type f -name '*.php' -exec php -l {} \; find ban-server -type f -name '*.php' -exec php -l {} \;
find gateway prod-server common -type f -name '*.sh' -exec sh -n {} \; find gateway prod-server common -type f -name '*.sh' -exec sh -n {} \;
if python3 gateway/usr/share/eterban/unban.py >/dev/null 2>&1; then if printf '%s\n' '[Settings]' | python3 -c 'from pathlib import Path; p = Path("gateway/usr/share/eterban/unban.py"); code = p.read_text().replace("/etc/eterban/settings.ini", "/proc/self/fd/0"); exec(compile(code, str(p), "exec"))' >/dev/null 2>&1; then
echo 'unban.py without an IP must fail' >&2 echo 'unban.py without an IP must fail' >&2
exit 1 exit 1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment