mirror of https://github.com/fail2ban/fail2ban
skip test if readline module missing (add it as optional module installs in GHA workflow)
parent
4337e36616
commit
15f5c36a17
|
@ -61,6 +61,8 @@ jobs:
|
||||||
#sudo apt-get -y install python${F2B_PY/2/}-systemd || echo 'systemd not available'
|
#sudo apt-get -y install python${F2B_PY/2/}-systemd || echo 'systemd not available'
|
||||||
sudo apt-get -y install libsystemd-dev || echo 'systemd dependencies seems to be unavailable'
|
sudo apt-get -y install libsystemd-dev || echo 'systemd dependencies seems to be unavailable'
|
||||||
python -m pip install systemd-python || echo 'systemd not available'
|
python -m pip install systemd-python || echo 'systemd not available'
|
||||||
|
#readline if available as module:
|
||||||
|
python -c 'import readline' 2> /dev/null || python -m pip install readline || echo 'readline not available'
|
||||||
|
|
||||||
- name: Before scripts
|
- name: Before scripts
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -568,6 +568,11 @@ class Fail2banClientTest(Fail2banClientServerBase):
|
||||||
os.kill(pid, signal.SIGCONT)
|
os.kill(pid, signal.SIGCONT)
|
||||||
self.assertLogged("timed out")
|
self.assertLogged("timed out")
|
||||||
self.pruneLog()
|
self.pruneLog()
|
||||||
|
# check readline module available (expected by interactive client)
|
||||||
|
try:
|
||||||
|
import readline
|
||||||
|
except ImportError as e:
|
||||||
|
raise unittest.SkipTest('Skip test because of import error: %s' % e)
|
||||||
# interactive client chat with started server:
|
# interactive client chat with started server:
|
||||||
INTERACT += [
|
INTERACT += [
|
||||||
"echo INTERACT-ECHO",
|
"echo INTERACT-ECHO",
|
||||||
|
|
Loading…
Reference in New Issue