fgerlits commented on code in PR #2072:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2072#discussion_r2614855327


##########
extensions/grafana-loki/tests/features/steps/steps.py:
##########
@@ -0,0 +1,63 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+from behave import step, then
+
+from minifi_test_framework.steps import checking_steps        # noqa: F401
+from minifi_test_framework.steps import configuration_steps   # noqa: F401
+from minifi_test_framework.steps import core_steps            # noqa: F401
+from minifi_test_framework.steps import flow_building_steps   # noqa: F401
+from minifi_test_framework.core.minifi_test_context import MinifiTestContext
+from minifi_test_framework.core.helpers import log_due_to_failure
+from grafana_loki_container import GrafanaLokiContainer, GrafanaLokiOptions
+from reverse_proxy_container import ReverseProxyContainer
+
+
+@step("a Grafana Loki server is set up")
+def step_impl(context: MinifiTestContext):
+    context.containers["grafana-loki-server"] = GrafanaLokiContainer(context, 
GrafanaLokiOptions())
+
+
+@step("a Grafana Loki server is set up with multi-tenancy enabled")
+def step_impl(context: MinifiTestContext):
+    context.containers["grafana-loki-server"] = GrafanaLokiContainer(context, 
GrafanaLokiOptions(enable_multi_tenancy=True))
+
+
+@step("a Grafana Loki server with SSL is set up")
+def step_impl(context: MinifiTestContext):
+    context.containers["grafana-loki-server"] = GrafanaLokiContainer(context, 
GrafanaLokiOptions(enable_ssl=True))
+
+
+@then("\"{lines}\" lines are published to the Grafana Loki server in less than 
{timeout_seconds:d} seconds")
+@then("\"{lines}\" line is published to the Grafana Loki server in less than 
{timeout_seconds:d} seconds")
+def step_impl(context, lines: str, timeout_seconds: int):
+    assert context.containers["grafana-loki-server"].are_lines_present(lines, 
timeout_seconds, False) or log_due_to_failure(context)

Review Comment:
   I don't insist, but to me, `ssl=False` would be more readable, even if it 
means we have to add keywords for other arguments, too.



-- 
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]

Reply via email to