lordgamez commented on code in PR #2059:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2059#discussion_r2661844266
##########
behave_framework/src/minifi_test_framework/steps/checking_steps.py:
##########
@@ -83,16 +84,34 @@ def step_impl(context: MinifiTestContext, message: str,
duration: str):
context=context)
+@then("the Minifi logs match the following regex: \"{regex}\" in less than
{duration}")
+def step_impl(context, regex, duration):
+ duration_seconds = humanfriendly.parse_timespan(duration)
+ assert wait_for_condition(condition=lambda: re.search(regex,
context.get_default_minifi_container().get_logs()),
+ timeout_seconds=duration_seconds,
bail_condition=lambda: context.get_default_minifi_container().exited,
+ context=context)
+
+
@step('no errors were generated on the http-proxy regarding "{url}"')
def step_impl(context: MinifiTestContext, url: str):
http_proxy_container = next(container for container in
context.containers.values() if isinstance(container, HttpProxy))
assert http_proxy_container.check_http_proxy_access(url) or
http_proxy_container.log_app_output()
+@then('no files are placed in the "{directory}" directory in {duration} of
running time')
+def step_impl(context, directory, duration):
+ duration_seconds = humanfriendly.parse_timespan(duration)
+ assert check_condition_after_wait(condition=lambda:
context.get_default_minifi_container().get_number_of_files(directory) < 1,
Review Comment:
Updated in
https://github.com/apache/nifi-minifi-cpp/pull/2059/commits/ddab3ecd04476c801e3f6e2d3190e39bd7e0c25d
as not creating an output directory should also return 0 (not created due to
no output was generated).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]