From c706ec23158105a8951f1d9d45c9f27f54ac1a88 Mon Sep 17 00:00:00 2001 From: Wolfgang Date: Wed, 3 Apr 2024 19:22:09 +0200 Subject: [PATCH] Fix tests, attempt to fix fail2ban --- roles/fail2ban/templates/jail.local.j2 | 24 ++++++++++++------------ testing/selenium/acceptance.py | 5 +++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/roles/fail2ban/templates/jail.local.j2 b/roles/fail2ban/templates/jail.local.j2 index 1c9e091..0d7fb2b 100755 --- a/roles/fail2ban/templates/jail.local.j2 +++ b/roles/fail2ban/templates/jail.local.j2 @@ -1,15 +1,15 @@ [DEFAULT] -banaction = iptables-allports -bantime = -1 -findtime = 600 -maxretry = 5 -ignoreip = 127.0.0.1/8 ::1 -action = %(action_mwl)s -destemail = {{ email }} -sender = {{ email }} +banaction=iptables-allports +bantime=-1 +findtime=600 +maxretry=5 +ignoreip=127.0.0.1/8 ::1 +action=%(action_mwl)s +destemail={{ email }} +sender={{ email }} [sshd] -backend = systemd -enabled = true -port = {{ ssh_port }} -filter = sshd +backend=systemd +enabled=true +port={{ ssh_port }} +filter=sshd diff --git a/testing/selenium/acceptance.py b/testing/selenium/acceptance.py index f9f771e..248105a 100755 --- a/testing/selenium/acceptance.py +++ b/testing/selenium/acceptance.py @@ -144,15 +144,16 @@ def download_wg_config(driver, base_url, client, secret): sleep(1) + # Sometimes Authelia does not accept the TOTP code the first time... actions = ActionChains(driver) actions.send_keys(totp.now()) actions.perform() - sleep(2) + sleep(1) logger.debug(f"Opening wg.{base_url} in the browser") driver.get(f"https://wg.{base_url}") - sleep(2) + sleep(5) logger.debug("Clicking on the 'New Client' button") new_client_button = driver.find_element("xpath", "//*[contains(text(), 'New Client')]")