log_test_helper module

Description:

This is not a specific test but a helper utility used by other tests to check pod logs for errors.

log_test_helper.get_ns_pods(namespace)
log_test_helper.search_backwards(string, regex)

Search backwards through a multiline string for a regex, finding the LAST occurrence of the regex. The search is only performed at the character AFTER each carriage return in the string. Assumes Unix line endings but should work with DOS line endings as well.

Returns: The matched string or None if no match found.

log_test_helper.search_forwards(string, regex)
log_test_helper.test_logs(namespace, pod_name_prefix, container, TIME_RANGE_SECONDS, critical_error_strings, pods, compact)