Commit graph

6 commits

Author SHA1 Message Date
Paulus Schoutsen
6cba51fd0e Lint 2019-01-11 16:31:16 -08:00
Paulus Schoutsen
578bfe9798 Fix fail2ban tests 2019-01-11 15:01:24 -08:00
Antoine GRÉA
14dd8791ec Adding IPv6 to fail2ban sensor ()
* Fixing fail2ban regex for ipv6

* Adding IPv6 tests for fail2ban

* Formating code for hound

* Formating again

* Formating again 2
2019-01-11 12:54:47 -08:00
Antoine GRÉA
1099018a5e Fix fail2ban by removal of internal timer logic ()
* Remove timer logic from sensor class

Proposed fix for issue 

* Updating the tests to remove timer logic

* Removing unecessary dependancy

* Fixing requested changes

* Commit to try to fix the CLA ?
2018-12-22 18:25:02 +01:00
Paulus Schoutsen
08fe7c3ece
Pytest tests ()
* Convert core tests

* Convert component tests to use pytest assert

* Lint 🤷‍♂️

* Fix test

* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Kevin Fronczak
f9d89a016e Add fail2ban sensor ()
* Initial revision of fail2ban sensor

* Verified working, added tests

* Re-factored code so that log reading isn't called for each sensor

* Lint fixes

* Removed errant reset of last ban, added test to verify bans persist through update

* Removed for loop in read_log and replaced with regex per review request

* Refactored update to use current ban array for last ban state

- also was missing return False in timer for default behavior

* Removed CONF_SCAN_INTERVAL from PLATFORM_SCHEMA.extend

- renamed DEFAULT_SCAN_INTERVAL to SCAN_INTERVAL

* SCAN_INTERVAL changed to timedelta

* Force travis rebuild (last build timed out)

* Using compiled regex now
2017-10-23 09:20:45 +02:00