diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index bfcf94b20fbc..c3781765a682 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -386,7 +386,7 @@ in { etebase-server = handleTest ./etebase-server.nix {}; etesync-dav = handleTest ./etesync-dav.nix {}; evcc = runTest ./evcc.nix; - fail2ban = handleTest ./fail2ban.nix { }; + fail2ban = runTest ./fail2ban.nix; fakeroute = handleTest ./fakeroute.nix {}; fancontrol = handleTest ./fancontrol.nix {}; fanout = handleTest ./fanout.nix {}; diff --git a/nixos/tests/fail2ban.nix b/nixos/tests/fail2ban.nix index fc12b7aede56..93cea3f37c90 100644 --- a/nixos/tests/fail2ban.nix +++ b/nixos/tests/fail2ban.nix @@ -1,21 +1,19 @@ -import ./make-test-python.nix ( - { pkgs, ... }: - { - name = "fail2ban"; +{ pkgs, ... }: +{ + name = "fail2ban"; - nodes.machine = _: { - services.fail2ban = { - enable = true; - bantime-increment.enable = true; - }; - - services.openssh.enable = true; + nodes.machine = _: { + services.fail2ban = { + enable = true; + bantime-increment.enable = true; }; - testScript = '' - machine.wait_for_unit("multi-user.target") + services.openssh.enable = true; + }; - machine.wait_for_unit("fail2ban") - ''; - } -) + testScript = '' + machine.wait_for_unit("multi-user.target") + + machine.wait_for_unit("fail2ban") + ''; +}