fail2ban / fail2ban

@@ -384,7 +384,17 @@
Loading
384 384
			"Found a match but no valid date/time found",
385 385
			"Match without a timestamp:", all=True)
386 386
387 -
		self.pruneLog()
387 +
	def testIncompleteDateTime(self):
388 +
		# datepattern in followed lines doesn't match previously known pattern + line is too short
389 +
		# (logging break-off, no flush, etc):
390 +
		self.assertTrue(_test_exec(
391 +
			'-o', 'Found-ADDR:<ip>',
392 +
			'192.0.2.1 - - [02/May/2021:18:40:55 +0100] "GET / HTTP/1.1" 302 328 "-" "Mozilla/5.0" "-"\n'
393 +
			'192.0.2.2 - - [02/May/2021:18:40:55 +0100\n'
394 +
			'192.0.2.3 - - [02/May/2021:18:40:55',
395 +
			'^<ADDR>'))
396 +
		self.assertLogged(
397 +
			"Found-ADDR:192.0.2.1", "Found-ADDR:192.0.2.2", "Found-ADDR:192.0.2.3", all=True)	
388 398
389 399
	def testFrmtOutputWrapML(self):
390 400
		unittest.F2B.SkipIfCfgMissing(stock=True)

@@ -365,10 +365,10 @@
Loading
365 365
				# with space or some special char), otherwise possible collision/pattern switch:
366 366
				if ((
367 367
					line[distance-1:distance] == self.__lastPos[1] or
368 -
						(line[distance] == self.__lastPos[2] and not self.__lastPos[2].isalnum())
368 +
						(line[distance:distance+1] == self.__lastPos[2] and not self.__lastPos[2].isalnum())
369 369
					) and (
370 370
					line[endpos:endpos+1] == self.__lastEndPos[2] or
371 -
						(line[endpos-1] == self.__lastEndPos[1] and not self.__lastEndPos[1].isalnum())
371 +
						(line[endpos-1:endpos] == self.__lastEndPos[1] and not self.__lastEndPos[1].isalnum())
372 372
				)):
373 373
					# search in line part only:
374 374
					log(logLevel-1, "  boundaries are correct, search in part %r", line[distance:endpos])
Files Coverage
config 97.37%
fail2ban 95.49%
setup.py 68.75%
Project Totals (75 files) 95.47%
4639.3
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
4639.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
4639.4
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
4639.2
TRAVIS_PYTHON_VERSION=3.4
TRAVIS_OS_NAME=linux
4639.6
TRAVIS_PYTHON_VERSION=3.8
TRAVIS_OS_NAME=linux
4639.5
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
4639.8
TRAVIS_PYTHON_VERSION=pypy3.5
TRAVIS_OS_NAME=linux
4639.7
TRAVIS_PYTHON_VERSION=3.9-dev
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading