Update cli messages module
Add new error messages. Change 'TestRun.fail' to 'TestRun.LOGGER.error'. Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
parent
5d78207f27
commit
a1d7297bb7
@ -25,10 +25,23 @@ stop_cache_incomplete = [
|
|||||||
r"Cache is in incomplete state - at least one core is inactive"
|
r"Cache is in incomplete state - at least one core is inactive"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
add_cached_core = [
|
||||||
|
r"Error while adding core device to cache instance \d+",
|
||||||
|
r"Core device \'/dev/\S+\' is already cached\."
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_mounted_core = [
|
||||||
|
r"Can\'t remove core \d+ from cache \d+\. Device /dev/cas\d+-\d+ is mounted\!"
|
||||||
|
]
|
||||||
|
|
||||||
|
stop_cache_mounted_core = [
|
||||||
|
r"Can\'t stop cache instance \d+\. Device /dev/cas\d+-\d+ is mounted\!"
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def check_msg(output: Output, expected_messages):
|
def check_msg(output: Output, expected_messages):
|
||||||
result = '\n'.join([output.stdout, output.stderr])
|
result = '\n'.join([output.stdout, output.stderr])
|
||||||
for msg in expected_messages:
|
for msg in expected_messages:
|
||||||
matches = re.search(msg, result)
|
matches = re.search(msg, result)
|
||||||
if not matches:
|
if not matches:
|
||||||
TestRun.fail(f"Message is incorrect, expected: {msg}\n actual: {result}.")
|
TestRun.LOGGER.error(f"Message is incorrect, expected: {msg}\n actual: {result}.")
|
||||||
|
Loading…
Reference in New Issue
Block a user