Add test files (unit and integration tests)
Some checks failed
Some checks failed
This commit is contained in:
@@ -45,14 +45,14 @@ def sample_apache_logs():
|
||||
def error_logs():
|
||||
"""Sample error log lines."""
|
||||
return [
|
||||
'Jan 15 10:30:00 server-01 app[1234]: Traceback (most recent call last):',
|
||||
"Jan 15 10:30:00 server-01 app[1234]: Traceback (most recent call last):",
|
||||
'Jan 15 10:30:01 server-01 app[1234]: File "main.py", line 42, in <module>',
|
||||
'Jan 15 10:30:02 server-01 app[1234]: result = process_data(data)',
|
||||
"Jan 15 10:30:02 server-01 app[1234]: result = process_data(data)",
|
||||
'Jan 15 10:30:03 server-01 app[1234]: File "main.py", line 100, in process_data',
|
||||
'Jan 15 10:30:04 server-01 app[1234]: KeyError: "Missing required key \'id\'"',
|
||||
"Jan 15 10:30:04 server-01 app[1234]: KeyError: \"Missing required key 'id'\"",
|
||||
'{"level": "ERROR", "message": "NullPointerException: Cannot call method on null object"}',
|
||||
'{"level": "ERROR", "message": "HTTP Error 500: Internal Server Error"}',
|
||||
'Jan 15 10:30:05 server-01 kernel: [1234.567] Out of memory: Kill process 1234 (app)',
|
||||
"Jan 15 10:30:05 server-01 kernel: [1234.567] Out of memory: Kill process 1234 (app)",
|
||||
]
|
||||
|
||||
|
||||
@@ -60,4 +60,5 @@ def error_logs():
|
||||
def analyzer():
|
||||
"""Log analyzer instance."""
|
||||
from loglens.analyzers.analyzer import LogAnalyzer
|
||||
|
||||
return LogAnalyzer()
|
||||
|
||||
Reference in New Issue
Block a user