Merge pull request #790 from karolinavelkaja/zero_metadata_test

Adding new test for '--zero-metadata' command
This commit is contained in:
Robert Baldyga
2021-09-14 07:57:00 +02:00
committed by GitHub
2 changed files with 291 additions and 0 deletions

View File

@@ -96,6 +96,33 @@ no_caches_running = [
r"No caches running"
]
unavailable_device = [
r"Error while opening \'\S+\'exclusively\. This can be due to\n"
r"cache instance running on this device\. In such case please stop the cache and try again\."
]
error_handling = [
r"Error during options handling"
]
no_cas_metadata = [
r"Device \'\S+\' does not contain OpenCAS's metadata\."
]
cache_dirty_data = [
r"Cache instance contains dirty data\. Clearing metadata will result in loss of dirty data\.\n"
r"Please load cache instance and flush dirty data in order to preserve them on the core "
r"device\.\n"
r"Alternatively, if you wish to clear metadata anyway, please use \'--force\' option\."
]
cache_dirty_shutdown = [
r"Cache instance did not shut down cleanly\. It might contain dirty data\. \n"
r"Clearing metadata might result in loss of dirty data\. Please recover cache instance\n"
r"by loading it and flush dirty data in order to preserve them on the core device\.\n"
r"Alternatively, if you wish to clear metadata anyway, please use \'--force\' option\."
]
def check_stderr_msg(output: Output, expected_messages):
return __check_string_msg(output.stderr, expected_messages)