-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config file for custom ignored_simple_tests
- Loading branch information
1 parent
e40b6ae
commit 57823ca
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,8 @@ | |
# | ||
# Red Hat Author(s): Vendula Poncova <[email protected]> | ||
# | ||
import os | ||
|
||
from pylorax.monitor import LogRequestHandler | ||
|
||
|
||
|
@@ -42,6 +44,18 @@ class VirtualLogRequestHandler(LogRequestHandler): | |
"Call Trace:" | ||
] | ||
|
||
# Path to the config file | ||
CONFIG_FILE_PATH = '/tmp/ignored_simple_tests.conf' | ||
|
||
if os.path.isfile(CONFIG_FILE_PATH): | ||
with open(CONFIG_FILE_PATH, 'r') as config_file: | ||
extra_ignored_tests = [line.strip() for line in config_file if line.strip()] | ||
# Extend the ignored_simple_tests list | ||
ignored_simple_tests.extend(extra_ignored_tests) | ||
|
||
# Remove the config file after reading | ||
os.remove(CONFIG_FILE_PATH) | ||
|
||
# Specify error lines you want to add on top | ||
# of the default ones contained in Lorax | ||
simple_tests = LogRequestHandler.simple_tests + [ | ||
|