You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2026/02/26 15:52:51 UTC
(nifi-minifi-cpp) branch MINIFICPP-2711 updated (f125497e7 -> 997867a53)
This is an automated email from the ASF dual-hosted git repository.
martinzink pushed a change to branch MINIFICPP-2711
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
omit f125497e7 fix
omit ab7cf1a25 linter fix
omit 925076339 review changes
omit ca3acaac2 review changes
omit 2cbf3aeaf MINIFICPP-2711 Docker tests, missing logs if container fails to start
add 94a8480ac MINIFICPP-2703 Update GCP extension to use unified credentials
add 18380fc7d MINIFICPP-2707 Catch exceptions during C2 Start/Stop commands
add 9187c2efd MINIFICPP-2709 Fix site to site receive using HTTP protocol
add 961f352f0 MINIFICPP-2713 curl: upgrade to 8.18.0
add 3b9711e69 MINIFICPP-2720 Overwrite agent_version.cpp instead of appending
add 2ac1f1b86 MINIFICPP-2721 Fix rocky linux docker image name retrieval in CI
add d24d32400 MINIFICPP-2683 Move C2 docker tests to modular docker tests
add e730451c9 MINIFICPP-2685 Move MQTT tests to modular docker tests
add ebc89c186 MINIFICPP-2256 Remove LoggerConfiguration::newInstance
add 3b1334649 MINIFICPP-2722 C API enum explicit type
add 3190ca615 MINIFICPP-2724 Add MinifiStatus return type to C api function that might fail
add b525cc861 MINIFICPP-2725 python: fix EL with ENVIRONMENT scope
add e58d829b1 MINIFICPP-2728 upgrade openssl to 3.3.6
add 71908d19e MINIFICPP-2727 Stabilize verify package tests
add 7c18354a8 MINIFICPP-2729 Increase timeout for MacOS jobs
add f856bb60f MINIFICPP-2730 Check if config.yml exists when creating the debug bundle
add 30fa5d153 MINIFICPP-2726 Fix HTTP S2S no data and error handling
add 162ccfb55 MINIFICPP-2732 Clear class descriptions when extensions are cleared
add 4096b8637 MINIFICPP-2733 Fix compilation on Windows in debug mode with Ninja
add 24933300e MINIFICPP-2734 Remove BinFiles from processor list
add 2f26cb92f MINIFICPP-2723 Add log and properties.d dir property files to debug bundle
new 13876a209 MINIFICPP-2711 Docker tests, missing logs if container fails to start
new 18c6efafb review changes
new 49b463f81 review changes
new 734bcccda linter fix
new 997867a53 fix
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (f125497e7)
\
N -- N -- N refs/heads/MINIFICPP-2711 (997867a53)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/ci.yml | 4 +-
CMakeLists.txt | 2 +-
PROCESSORS.md | 29 --
README.md | 2 +-
.../minifi_test_framework/containers/container.py | 25 ++
.../containers/http_proxy_container.py | 1 +
.../containers/minifi_container.py | 10 +
.../minifi_test_framework/steps/checking_steps.py | 36 +-
.../src/minifi_test_framework/steps/core_steps.py | 57 ++-
.../steps/flow_building_steps.py | 10 +-
cmake/BundledLibcURL.cmake | 8 +-
cmake/BundledOpenSSL.cmake | 12 +-
cmake/GoogleCloudCpp.cmake | 4 +-
core-framework/include/http/HTTPStream.h | 69 ++--
core-framework/src/http/HTTPClient.cpp | 5 +-
core-framework/src/http/HTTPStream.cpp | 34 +-
docker/RunBehaveTests.sh | 3 +-
docker/requirements.txt | 1 -
docker/test/integration/cluster/ContainerStore.py | 37 --
.../test/integration/cluster/DockerTestCluster.py | 5 -
docker/test/integration/cluster/ImageStore.py | 11 -
.../cluster/containers/MinifiC2ServerContainer.py | 112 ------
.../cluster/containers/MinifiContainer.py | 31 +-
.../cluster/containers/MqttBrokerContainer.py | 40 ---
.../features/MiNiFi_integration_test_driver.py | 8 -
docker/test/integration/features/s2s.feature | 4 +
docker/test/integration/features/steps/steps.py | 59 ---
.../Minifi_flow_json_serializer.py | 1 +
.../Minifi_flow_yaml_serializer.py | 1 +
.../integration/minifi/processors/ConsumeMQTT.py | 30 --
.../integration/minifi/processors/PublishMQTT.py | 30 --
.../include/api/core/ProcessContext.h | 2 -
.../include/api/utils/ProcessorConfigUtils.h | 24 +-
.../cpp-extension-lib/src/core/ProcessContext.cpp | 10 -
.../cpp-extension-lib/src/core/ProcessSession.cpp | 22 +-
.../include/utils/ProcessorConfigUtils.h | 24 +-
.../azure/tests/FetchAzureDataLakeStorageTests.cpp | 2 +-
.../features/steps/couchbase_server_container.py | 4 +-
.../GCPCredentialsControllerService.cpp | 37 +-
.../GCPCredentialsControllerService.h | 9 +-
extensions/gcp/processors/GCSProcessor.cpp | 14 +-
extensions/gcp/processors/GCSProcessor.h | 6 +-
.../tests/GCPCredentialsControllerServiceTests.cpp | 17 +-
.../tests/features/steps/grafana_loki_container.py | 4 +-
extensions/libarchive/BinFiles.cpp | 2 -
.../llamacpp/tests/RunLlamaCppInferenceTests.cpp | 4 +-
extensions/mqtt/tests/ConsumeMQTTTests.cpp | 4 +-
extensions/mqtt/tests/PublishMQTTTests.cpp | 2 +-
.../tests/features/environment.py | 21 +-
.../mqtt/tests}/features/mqtt.feature | 398 ++++++++++++---------
.../features/resources/publish_mqtt_message.py | 20 +-
.../tests/features/steps/mqtt_broker_container.py | 63 ++++
extensions/mqtt/tests/features/steps/steps.py | 76 ++++
.../python/pythonprocessors/nifiapi/properties.py | 8 +-
.../tests/features/environment.py | 21 ++
.../tests}/features/minifi_c2_server.feature | 15 +-
.../tests/features/repository.feature | 1 +
.../features/steps/minifi_c2_server_container.py | 76 ++++
.../resources/minifi-c2-server/authorizations.yaml | 0
.../resources/minifi-c2-server/c2.properties | 0
.../steps}/resources/minifi-c2-server/config.yml | 0
.../tests/features/steps/steps.py | 54 ++-
.../tests/unit/SegmentContentTests.cpp | 4 +-
.../tests/unit/SplitContentTests.cpp | 2 +-
.../tests/unit/SplitTextTests.cpp | 2 +-
generateVersion.bat | 2 +-
.../include/core/extension/ExtensionManager.h | 6 +
.../include/core/logging/LoggerConfiguration.h | 9 +-
libminifi/include/properties/Configure.h | 3 +
libminifi/include/properties/Properties.h | 3 +-
.../include/sitetosite/HttpSiteToSiteClient.h | 3 +
libminifi/include/sitetosite/SiteToSiteClient.h | 7 +-
libminifi/src/Configure.cpp | 14 +
libminifi/src/FlowController.cpp | 22 +-
libminifi/src/agent/agent_docs.cpp | 3 +
libminifi/src/c2/C2Agent.cpp | 26 +-
libminifi/src/core/extension/ExtensionManager.cpp | 8 +
libminifi/src/minifi-c.cpp | 31 +-
libminifi/src/sitetosite/HttpSiteToSiteClient.cpp | 91 ++++-
libminifi/src/sitetosite/SiteToSiteClient.cpp | 40 +--
libminifi/test/integration/C2DebugBundleTest.cpp | 63 +++-
.../test/libtest/integration/IntegrationBase.cpp | 3 +-
.../test/libtest/integration/IntegrationBase.h | 9 +-
libminifi/test/libtest/unit/TestBase.cpp | 7 +-
libminifi/test/unit/LoggerTests.cpp | 84 ++---
minifi-api/include/minifi-c/minifi-c.h | 15 +-
minifi-api/include/minifi-cpp/agent/agent_docs.h | 1 +
.../include/minifi-cpp/properties/Configure.h | 3 +
.../include/minifi-cpp/properties/Properties.h | 1 +
minifi-api/minifi-c-api.def | 1 -
thirdparty/curl/module-path.patch | 17 +-
91 files changed, 1153 insertions(+), 948 deletions(-)
delete mode 100644 docker/test/integration/cluster/containers/MinifiC2ServerContainer.py
delete mode 100644 docker/test/integration/cluster/containers/MqttBrokerContainer.py
delete mode 100644 docker/test/integration/minifi/processors/ConsumeMQTT.py
delete mode 100644 docker/test/integration/minifi/processors/PublishMQTT.py
copy extensions/{grafana-loki => mqtt}/tests/features/environment.py (71%)
rename {docker/test/integration => extensions/mqtt/tests}/features/mqtt.feature (60%)
rename docker/test/integration/cluster/checkers/MqttHelper.py => extensions/mqtt/tests/features/resources/publish_mqtt_message.py (62%)
create mode 100644 extensions/mqtt/tests/features/steps/mqtt_broker_container.py
create mode 100644 extensions/mqtt/tests/features/steps/steps.py
rename {docker/test/integration => extensions/standard-processors/tests}/features/minifi_c2_server.feature (82%)
create mode 100644 extensions/standard-processors/tests/features/steps/minifi_c2_server_container.py
rename {docker/test/integration => extensions/standard-processors/tests/features/steps}/resources/minifi-c2-server/authorizations.yaml (100%)
rename {docker/test/integration => extensions/standard-processors/tests/features/steps}/resources/minifi-c2-server/c2.properties (100%)
rename {docker/test/integration => extensions/standard-processors/tests/features/steps}/resources/minifi-c2-server/config.yml (100%)
(nifi-minifi-cpp) 04/05: linter fix
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
martinzink pushed a commit to branch MINIFICPP-2711
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 734bcccda118200471e83feaab3816475839d71a
Author: Martin Zink <ma...@apache.org>
AuthorDate: Thu Feb 12 14:12:50 2026 +0100
linter fix
---
behave_framework/src/minifi_test_framework/containers/container.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/behave_framework/src/minifi_test_framework/containers/container.py b/behave_framework/src/minifi_test_framework/containers/container.py
index 62180f3c1..90657fbe8 100644
--- a/behave_framework/src/minifi_test_framework/containers/container.py
+++ b/behave_framework/src/minifi_test_framework/containers/container.py
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-from typing import TYPE_CHECKING, Union
+from typing import TYPE_CHECKING
import json
import logging
(nifi-minifi-cpp) 01/05: MINIFICPP-2711 Docker tests, missing logs if container fails to start
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
martinzink pushed a commit to branch MINIFICPP-2711
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 13876a209563af42baf41ed55087862b48153d86
Author: Martin Zink <ma...@apache.org>
AuthorDate: Thu Feb 5 19:42:06 2026 +0100
MINIFICPP-2711 Docker tests, missing logs if container fails to start
---
.../src/minifi_test_framework/containers/container.py | 7 ++++++-
.../src/minifi_test_framework/containers/http_proxy_container.py | 6 +++---
.../src/minifi_test_framework/containers/minifi_container.py | 6 +++---
.../src/minifi_test_framework/containers/nifi_container.py | 6 +++---
behave_framework/src/minifi_test_framework/steps/core_steps.py | 9 +++++++--
extensions/aws/tests/features/steps/kinesis_server_container.py | 6 +++---
extensions/aws/tests/features/steps/s3_server_container.py | 6 +++---
extensions/azure/tests/features/steps/azure_server_container.py | 6 +++---
extensions/azure/tests/features/steps/steps.py | 2 +-
.../couchbase/tests/features/steps/couchbase_server_container.py | 6 +++---
extensions/couchbase/tests/features/steps/steps.py | 2 +-
.../elasticsearch/tests/features/steps/elastic_base_container.py | 6 +++---
.../tests/features/steps/elasticsearch_container.py | 4 ++--
.../elasticsearch/tests/features/steps/opensearch_container.py | 4 ++--
extensions/elasticsearch/tests/features/steps/steps.py | 4 ++--
extensions/gcp/tests/features/steps/fake_gcs_server_container.py | 4 ++--
extensions/gcp/tests/features/steps/steps.py | 2 +-
.../grafana-loki/tests/features/steps/grafana_loki_container.py | 4 ++--
.../grafana-loki/tests/features/steps/reverse_proxy_container.py | 6 +++---
extensions/kafka/tests/features/steps/kafka_server_container.py | 4 ++--
extensions/kafka/tests/features/steps/steps.py | 2 +-
extensions/opc/tests/features/steps/opc_ua_server_container.py | 6 +++---
extensions/splunk/tests/features/steps/splunk_container.py | 6 +++---
extensions/splunk/tests/features/steps/steps.py | 2 +-
.../sql/tests/features/steps/postgress_server_container.py | 7 ++++---
.../tests/features/steps/diag_slave_container.py | 6 +++---
extensions/standard-processors/tests/features/steps/steps.py | 2 +-
.../tests/features/steps/tcp_client_container.py | 6 +++---
28 files changed, 74 insertions(+), 63 deletions(-)
diff --git a/behave_framework/src/minifi_test_framework/containers/container.py b/behave_framework/src/minifi_test_framework/containers/container.py
index f3268d2dd..cf87e2208 100644
--- a/behave_framework/src/minifi_test_framework/containers/container.py
+++ b/behave_framework/src/minifi_test_framework/containers/container.py
@@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from typing import TYPE_CHECKING, Union
+
import json
import logging
import os
@@ -29,6 +31,9 @@ from minifi_test_framework.containers.directory import Directory
from minifi_test_framework.containers.file import File
from minifi_test_framework.containers.host_file import HostFile
+if TYPE_CHECKING:
+ from minifi_test_framework.core.minifi_test_context import MinifiTestContext
+
class Container:
def __init__(self, image_name: str, container_name: str, network: Network, command: str | None = None, entrypoint: str | None = None):
@@ -96,7 +101,7 @@ class Container:
def is_deployed(self) -> bool:
return self.container is not None
- def deploy(self) -> bool:
+ def deploy(self, context: "Union[MinifiTestContext, None]") -> bool:
if self.is_deployed():
logging.info(f"Container '{self.container_name}' is already deployed.")
return True
diff --git a/behave_framework/src/minifi_test_framework/containers/http_proxy_container.py b/behave_framework/src/minifi_test_framework/containers/http_proxy_container.py
index 54e766fa7..f98702b94 100644
--- a/behave_framework/src/minifi_test_framework/containers/http_proxy_container.py
+++ b/behave_framework/src/minifi_test_framework/containers/http_proxy_container.py
@@ -47,14 +47,14 @@ class HttpProxy(Container):
super().__init__("minifi-http-proxy:latest", f"http-proxy-{test_context.scenario_id}", test_context.network)
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "Accepting HTTP Socket connections at"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=5,
bail_condition=lambda: self.exited,
- context=None
+ context=context
)
def check_http_proxy_access(self, url):
diff --git a/behave_framework/src/minifi_test_framework/containers/minifi_container.py b/behave_framework/src/minifi_test_framework/containers/minifi_container.py
index 8d2b5f992..e17d5d381 100644
--- a/behave_framework/src/minifi_test_framework/containers/minifi_container.py
+++ b/behave_framework/src/minifi_test_framework/containers/minifi_container.py
@@ -60,7 +60,7 @@ class MinifiContainer(Container):
self._fill_default_properties()
self._fill_default_log_properties()
- def deploy(self) -> bool:
+ def deploy(self, context: MinifiTestContext | None) -> bool:
flow_config = self.flow_definition.to_yaml()
logging.info(f"Deploying MiNiFi container '{self.container_name}' with flow configuration:\n{flow_config}")
if self.is_fhs:
@@ -78,7 +78,7 @@ class MinifiContainer(Container):
resource_dir = Path(__file__).resolve().parent / "resources" / "minifi-controller"
self.host_files.append(HostFile("/tmp/resources/minifi-controller/config.yml", os.path.join(resource_dir, "config.yml")))
- if not super().deploy():
+ if not super().deploy(context):
return False
finished_str = "MiNiFi started"
@@ -86,7 +86,7 @@ class MinifiContainer(Container):
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=15,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
def set_property(self, key: str, value: str):
self.properties[key] = value
diff --git a/behave_framework/src/minifi_test_framework/containers/nifi_container.py b/behave_framework/src/minifi_test_framework/containers/nifi_container.py
index 396b1e1a7..d40724de1 100644
--- a/behave_framework/src/minifi_test_framework/containers/nifi_container.py
+++ b/behave_framework/src/minifi_test_framework/containers/nifi_container.py
@@ -70,7 +70,7 @@ class NifiContainer(Container):
super().__init__("apache/nifi:" + self.NIFI_VERSION, name, test_context.network, entrypoint=command)
- def deploy(self):
+ def deploy(self, context: MinifiTestContext | None) -> bool:
flow_config = self.flow_definition.to_json()
buffer = io.BytesIO()
@@ -80,10 +80,10 @@ class NifiContainer(Container):
gzipped_bytes = buffer.getvalue()
self.files.append(File("/tmp/nifi_config/flow.json.gz", gzipped_bytes))
- super().deploy()
+ super().deploy(context)
finished_str = "Started Application in"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=300,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
diff --git a/behave_framework/src/minifi_test_framework/steps/core_steps.py b/behave_framework/src/minifi_test_framework/steps/core_steps.py
index b332b7e46..4c118d6b4 100644
--- a/behave_framework/src/minifi_test_framework/steps/core_steps.py
+++ b/behave_framework/src/minifi_test_framework/steps/core_steps.py
@@ -36,16 +36,21 @@ from minifi_test_framework.core.minifi_test_context import DEFAULT_MINIFI_CONTAI
@when("all instances start up")
def step_impl(context: MinifiTestContext):
for container in context.containers.values():
- assert container.deploy() or container.log_app_output()
+ assert container.deploy(context)
logging.debug("All instances started up")
@when("the MiNiFi instance starts up")
def step_impl(context: MinifiTestContext):
- assert context.get_or_create_default_minifi_container().deploy()
+ assert context.get_or_create_default_minifi_container().deploy(context)
logging.debug("MiNiFi instance started up")
+@when("the MiNiFi instance is started without assertions")
+def step_impl(context: MinifiTestContext):
+ context.get_or_create_default_minifi_container().deploy(context)
+
+
@step('a directory at "{directory}" has a file with the size "{size}"')
def step_impl(context: MinifiTestContext, directory: str, size: str):
size = humanfriendly.parse_size(size)
diff --git a/extensions/aws/tests/features/steps/kinesis_server_container.py b/extensions/aws/tests/features/steps/kinesis_server_container.py
index e92b33c41..01b6dced2 100644
--- a/extensions/aws/tests/features/steps/kinesis_server_container.py
+++ b/extensions/aws/tests/features/steps/kinesis_server_container.py
@@ -34,14 +34,14 @@ class KinesisServerContainer(Container):
self.environment.append("INITIALIZE_STREAMS=test_stream:3")
self.environment.append("LOG_LEVEL=DEBUG")
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "Starting Kinesis Plain Mock Service on port 4568"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=300,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
@retry_check()
def check_kinesis_server_record_data(self, record_data):
diff --git a/extensions/aws/tests/features/steps/s3_server_container.py b/extensions/aws/tests/features/steps/s3_server_container.py
index 01db20030..699617c71 100644
--- a/extensions/aws/tests/features/steps/s3_server_container.py
+++ b/extensions/aws/tests/features/steps/s3_server_container.py
@@ -26,14 +26,14 @@ class S3ServerContainer(Container):
super().__init__("adobe/s3mock:3.12.0", f"s3-server-{test_context.scenario_id}", test_context.network)
self.environment.append("initialBuckets=test_bucket")
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "Started S3MockApplication"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=15,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
def check_s3_server_object_data(self, test_data):
(code, output) = self.exec_run(["find", "/s3mockroot/test_bucket", "-mindepth", "1", "-maxdepth", "1", "-type", "d"])
diff --git a/extensions/azure/tests/features/steps/azure_server_container.py b/extensions/azure/tests/features/steps/azure_server_container.py
index 8cdc3205b..4caeb786b 100644
--- a/extensions/azure/tests/features/steps/azure_server_container.py
+++ b/extensions/azure/tests/features/steps/azure_server_container.py
@@ -33,13 +33,13 @@ class AzureServerContainer(Container):
self.azure_connection_string = "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;" \
f"BlobEndpoint=http://{azure_storage_hostname}:10000/devstoreaccount1;QueueEndpoint=http://{azure_storage_hostname}:10001/devstoreaccount1;"
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "Azurite Queue service is successfully listening at"
return wait_for_condition(condition=lambda: finished_str in self.get_logs(),
timeout_seconds=15,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
def check_azure_storage_server_data(self, test_data):
(code, output) = self.exec_run(["find", "/data/__blobstorage__", "-type", "f"])
diff --git a/extensions/azure/tests/features/steps/steps.py b/extensions/azure/tests/features/steps/steps.py
index 3331d7e71..58ad46e46 100644
--- a/extensions/azure/tests/features/steps/steps.py
+++ b/extensions/azure/tests/features/steps/steps.py
@@ -43,7 +43,7 @@ def step_impl(context: MinifiTestContext, processor_name: str):
@step("an Azure storage server is set up")
def step_impl(context):
context.containers["azure-storage-server"] = AzureServerContainer(context)
- assert context.containers["azure-storage-server"].deploy()
+ assert context.containers["azure-storage-server"].deploy(context)
@then('the object on the Azure storage server is "{object_data}"')
diff --git a/extensions/couchbase/tests/features/steps/couchbase_server_container.py b/extensions/couchbase/tests/features/steps/couchbase_server_container.py
index 893ba9de9..22f8b2328 100644
--- a/extensions/couchbase/tests/features/steps/couchbase_server_container.py
+++ b/extensions/couchbase/tests/features/steps/couchbase_server_container.py
@@ -37,14 +37,14 @@ class CouchbaseServerContainer(Container):
couchbase_key_content = crypto.dump_privatekey(type=crypto.FILETYPE_PEM, pkey=couchbase_key)
self.files.append(File("/opt/couchbase/var/lib/couchbase/inbox/pkey.key", couchbase_key_content, permissions=0o666))
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "logs available in"
assert wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=15,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
return self.run_post_startup_commands()
def run_post_startup_commands(self):
diff --git a/extensions/couchbase/tests/features/steps/steps.py b/extensions/couchbase/tests/features/steps/steps.py
index f20cfda2e..c1d8ba73d 100644
--- a/extensions/couchbase/tests/features/steps/steps.py
+++ b/extensions/couchbase/tests/features/steps/steps.py
@@ -28,7 +28,7 @@ from couchbase_server_container import CouchbaseServerContainer
@step("a Couchbase server is started")
def step_impl(context: MinifiTestContext):
context.containers["couchbase-server"] = CouchbaseServerContainer(context)
- assert context.containers["couchbase-server"].deploy()
+ assert context.containers["couchbase-server"].deploy(context)
@step("a CouchbaseClusterService controller service is set up to communicate with the Couchbase server")
diff --git a/extensions/elasticsearch/tests/features/steps/elastic_base_container.py b/extensions/elasticsearch/tests/features/steps/elastic_base_container.py
index 515d71aeb..5db6e61dc 100644
--- a/extensions/elasticsearch/tests/features/steps/elastic_base_container.py
+++ b/extensions/elasticsearch/tests/features/steps/elastic_base_container.py
@@ -23,13 +23,13 @@ class ElasticBaseContainer(Container):
super().__init__(image, container_name, test_context.network)
self.user = None
- def deploy(self, finished_str: str):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None, finished_str: str):
+ super().deploy(context)
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=300,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
def create_doc_elasticsearch(self, index_name: str, doc_id: str) -> bool:
(code, output) = self.exec_run(["/bin/bash", "-c",
diff --git a/extensions/elasticsearch/tests/features/steps/elasticsearch_container.py b/extensions/elasticsearch/tests/features/steps/elasticsearch_container.py
index e06458751..037711d75 100644
--- a/extensions/elasticsearch/tests/features/steps/elasticsearch_container.py
+++ b/extensions/elasticsearch/tests/features/steps/elasticsearch_container.py
@@ -53,8 +53,8 @@ class ElasticsearchContainer(ElasticBaseContainer):
self.environment.append("ELASTIC_PASSWORD=password")
- def deploy(self):
- return super().deploy('"current.health":"GREEN"')
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ return super().deploy(context, '"current.health":"GREEN"')
def elastic_generate_apikey(self):
api_url = "https://localhost:9200/_security/api_key"
diff --git a/extensions/elasticsearch/tests/features/steps/opensearch_container.py b/extensions/elasticsearch/tests/features/steps/opensearch_container.py
index 23882f530..cdf5008d5 100644
--- a/extensions/elasticsearch/tests/features/steps/opensearch_container.py
+++ b/extensions/elasticsearch/tests/features/steps/opensearch_container.py
@@ -43,8 +43,8 @@ class OpensearchContainer(ElasticBaseContainer):
features_dir = Path(__file__).resolve().parent.parent
self.host_files.append(HostFile('/usr/share/opensearch/config/opensearch.yml', os.path.join(features_dir, "resources", "opensearch.yml")))
- def deploy(self):
- return super().deploy('Hot-reloading of audit configuration is enabled')
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ return super().deploy(context, 'Hot-reloading of audit configuration is enabled')
def add_elastic_user_to_opensearch(self):
curl_cmd = [
diff --git a/extensions/elasticsearch/tests/features/steps/steps.py b/extensions/elasticsearch/tests/features/steps/steps.py
index 810c1516d..9a1fe6954 100644
--- a/extensions/elasticsearch/tests/features/steps/steps.py
+++ b/extensions/elasticsearch/tests/features/steps/steps.py
@@ -30,7 +30,7 @@ from opensearch_container import OpensearchContainer
@step('an Elasticsearch server is set up and a single document is present with "preloaded_id" in "my_index" with "value1" in "field1"')
def step_impl(context: MinifiTestContext):
context.containers["elasticsearch"] = ElasticsearchContainer(context)
- assert context.containers["elasticsearch"].deploy()
+ assert context.containers["elasticsearch"].deploy(context)
assert context.containers["elasticsearch"].create_doc_elasticsearch("my_index", "preloaded_id") or context.containers["elasticsearch"].log_app_output()
@@ -65,7 +65,7 @@ def step_impl(context):
@given('an Opensearch server is set up and a single document is present with "preloaded_id" in "my_index" with "value1" in "field1"')
def step_impl(context):
context.containers["opensearch"] = OpensearchContainer(context)
- context.containers["opensearch"].deploy()
+ context.containers["opensearch"].deploy(context)
context.containers["opensearch"].add_elastic_user_to_opensearch()
context.containers["opensearch"].create_doc_elasticsearch("my_index", "preloaded_id")
diff --git a/extensions/gcp/tests/features/steps/fake_gcs_server_container.py b/extensions/gcp/tests/features/steps/fake_gcs_server_container.py
index 132931878..b55b7aaff 100644
--- a/extensions/gcp/tests/features/steps/fake_gcs_server_container.py
+++ b/extensions/gcp/tests/features/steps/fake_gcs_server_container.py
@@ -26,8 +26,8 @@ class FakeGcsServerContainer(Container):
command=f'-scheme http -host fake-gcs-server-{test_context.scenario_id}')
self.dirs.append(Directory(path="/data/test-bucket", files={"test-file": "preloaded data\n"}))
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "server started at http"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
diff --git a/extensions/gcp/tests/features/steps/steps.py b/extensions/gcp/tests/features/steps/steps.py
index 639434d9d..175ff63c4 100644
--- a/extensions/gcp/tests/features/steps/steps.py
+++ b/extensions/gcp/tests/features/steps/steps.py
@@ -28,7 +28,7 @@ from fake_gcs_server_container import FakeGcsServerContainer
@step('a Google Cloud storage server is set up and a single object with contents "preloaded data" is present')
def step_impl(context: MinifiTestContext):
context.containers["fake-gcs-server"] = FakeGcsServerContainer(context)
- assert context.containers["fake-gcs-server"].deploy()
+ assert context.containers["fake-gcs-server"].deploy(context)
@then('an object with the content \"{content}\" is present in the Google Cloud storage')
diff --git a/extensions/grafana-loki/tests/features/steps/grafana_loki_container.py b/extensions/grafana-loki/tests/features/steps/grafana_loki_container.py
index 3d7e497aa..8a3e3fc7a 100644
--- a/extensions/grafana-loki/tests/features/steps/grafana_loki_container.py
+++ b/extensions/grafana-loki/tests/features/steps/grafana_loki_container.py
@@ -126,8 +126,8 @@ analytics:
self.files.append(File("/etc/loki/local-config.yaml", grafana_loki_yml_content.encode(), permissions=0o644))
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "Loki started"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
diff --git a/extensions/grafana-loki/tests/features/steps/reverse_proxy_container.py b/extensions/grafana-loki/tests/features/steps/reverse_proxy_container.py
index c415f6dba..409a9b9e6 100644
--- a/extensions/grafana-loki/tests/features/steps/reverse_proxy_container.py
+++ b/extensions/grafana-loki/tests/features/steps/reverse_proxy_container.py
@@ -28,11 +28,11 @@ class ReverseProxyContainer(Container):
"FORWARD_PORT=3100",
]
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "start worker process"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=60,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
diff --git a/extensions/kafka/tests/features/steps/kafka_server_container.py b/extensions/kafka/tests/features/steps/kafka_server_container.py
index 49c15a429..6a68f9611 100644
--- a/extensions/kafka/tests/features/steps/kafka_server_container.py
+++ b/extensions/kafka/tests/features/steps/kafka_server_container.py
@@ -88,8 +88,8 @@ Client {
"""
self.files.append(File("/opt/kafka/config/kafka_jaas.conf", jaas_config_file_content, permissions=0o644))
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "Kafka Server started"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
diff --git a/extensions/kafka/tests/features/steps/steps.py b/extensions/kafka/tests/features/steps/steps.py
index 474cc7bf1..0b3e2ed03 100644
--- a/extensions/kafka/tests/features/steps/steps.py
+++ b/extensions/kafka/tests/features/steps/steps.py
@@ -66,7 +66,7 @@ def step_impl(context):
def step_impl(context: MinifiTestContext):
kafka_server_container = context.containers["kafka-server"]
assert isinstance(kafka_server_container, KafkaServer)
- assert kafka_server_container.deploy()
+ assert kafka_server_container.deploy(context)
@step('the topic "{topic_name}" is initialized on the kafka broker')
diff --git a/extensions/opc/tests/features/steps/opc_ua_server_container.py b/extensions/opc/tests/features/steps/opc_ua_server_container.py
index 4973b9046..868e54202 100644
--- a/extensions/opc/tests/features/steps/opc_ua_server_container.py
+++ b/extensions/opc/tests/features/steps/opc_ua_server_container.py
@@ -23,11 +23,11 @@ class OPCUAServerContainer(Container):
def __init__(self, test_context: MinifiTestContext, command: Optional[List[str]] = None):
super().__init__("lordgamez/open62541:1.4.10", f"opcua-server-{test_context.scenario_id}", test_context.network, command=command)
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "New DiscoveryUrl added: opc.tcp://"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=15,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
diff --git a/extensions/splunk/tests/features/steps/splunk_container.py b/extensions/splunk/tests/features/steps/splunk_container.py
index 865407a64..4106bb63e 100644
--- a/extensions/splunk/tests/features/steps/splunk_container.py
+++ b/extensions/splunk/tests/features/steps/splunk_container.py
@@ -49,14 +49,14 @@ splunk:
self.files.append(File("/opt/splunk/etc/auth/splunk_cert.pem", splunk_cert_content.decode() + splunk_key_content.decode() + root_ca_content.decode(), permissions=0o644))
self.files.append(File("/opt/splunk/etc/auth/root_ca.pem", root_ca_content.decode(), permissions=0o644))
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "Ansible playbook complete, will begin streaming splunkd_stderr.log"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=300,
bail_condition=lambda: False,
- context=None)
+ context=context)
@retry_check()
def check_splunk_event(self, query: str) -> bool:
diff --git a/extensions/splunk/tests/features/steps/steps.py b/extensions/splunk/tests/features/steps/steps.py
index 16a8d66e9..5902fd2c9 100644
--- a/extensions/splunk/tests/features/steps/steps.py
+++ b/extensions/splunk/tests/features/steps/steps.py
@@ -26,7 +26,7 @@ from splunk_container import SplunkContainer
@step("a Splunk HEC is set up and running")
def step_impl(context: MinifiTestContext):
context.containers["splunk"] = SplunkContainer(context)
- assert context.containers["splunk"].deploy()
+ assert context.containers["splunk"].deploy(context)
assert context.containers["splunk"].enable_splunk_hec_indexer('splunk_hec_token') or context.containers["splunk"].log_app_output()
diff --git a/extensions/sql/tests/features/steps/postgress_server_container.py b/extensions/sql/tests/features/steps/postgress_server_container.py
index 96e0eb7eb..467eecc4b 100644
--- a/extensions/sql/tests/features/steps/postgress_server_container.py
+++ b/extensions/sql/tests/features/steps/postgress_server_container.py
@@ -20,6 +20,7 @@ from textwrap import dedent
from minifi_test_framework.containers.container import Container
from minifi_test_framework.containers.docker_image_builder import DockerImageBuilder
from minifi_test_framework.core.helpers import wait_for_condition
+from minifi_test_framework.core.minifi_test_context import MinifiTestContext
class PostgresContainer(Container):
@@ -48,14 +49,14 @@ class PostgresContainer(Container):
super(PostgresContainer, self).__init__("minifi-postgres-server:latest", f"postgres-server-{context.scenario_id}", context.network)
self.environment = ["POSTGRES_PASSWORD=password"]
- def deploy(self) -> bool:
- super(PostgresContainer, self).deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super(PostgresContainer, self).deploy(context)
finished_str = "database system is ready to accept connections"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=5,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
def check_query_results(self, query: str, number_of_rows: int) -> bool:
(code, output) = self.exec_run(["psql", "-U", "postgres", "-c", query])
diff --git a/extensions/standard-processors/tests/features/steps/diag_slave_container.py b/extensions/standard-processors/tests/features/steps/diag_slave_container.py
index a168c7325..ba89e75c3 100644
--- a/extensions/standard-processors/tests/features/steps/diag_slave_container.py
+++ b/extensions/standard-processors/tests/features/steps/diag_slave_container.py
@@ -40,14 +40,14 @@ ENV PROTOCOL=tcp
super().__init__("minifi-diag-slave-tcp:latest", f"diag-slave-tcp-{test_context.scenario_id}", test_context.network)
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "Server started up successfully."
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=5,
bail_condition=lambda: self.exited,
- context=None
+ context=context
)
def set_value_on_plc_with_modbus(self, modbus_cmd):
diff --git a/extensions/standard-processors/tests/features/steps/steps.py b/extensions/standard-processors/tests/features/steps/steps.py
index 517bff039..0e70c60c8 100644
--- a/extensions/standard-processors/tests/features/steps/steps.py
+++ b/extensions/standard-processors/tests/features/steps/steps.py
@@ -43,7 +43,7 @@ def step_impl(context: MinifiTestContext):
@step('there is an accessible PLC with modbus enabled')
def step_impl(context: MinifiTestContext):
modbus_container = context.containers["diag-slave-tcp"] = DiagSlave(context)
- assert modbus_container.deploy()
+ assert modbus_container.deploy(context)
@step('PLC register has been set with {modbus_cmd} command')
diff --git a/extensions/standard-processors/tests/features/steps/tcp_client_container.py b/extensions/standard-processors/tests/features/steps/tcp_client_container.py
index d3f02d16a..aca77dfae 100644
--- a/extensions/standard-processors/tests/features/steps/tcp_client_container.py
+++ b/extensions/standard-processors/tests/features/steps/tcp_client_container.py
@@ -29,12 +29,12 @@ class TcpClientContainer(Container):
)
super().__init__("alpine:3.17.3", f"tcp-client-{test_context.scenario_id}", test_context.network, cmd)
- def deploy(self):
- super().deploy()
+ def deploy(self, context: MinifiTestContext | None) -> bool:
+ super().deploy(context)
finished_str = "TCP client container started"
return wait_for_condition(
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=5,
bail_condition=lambda: self.exited,
- context=None
+ context=context
)
(nifi-minifi-cpp) 05/05: fix
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
martinzink pushed a commit to branch MINIFICPP-2711
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 997867a5398555e0df736e4c7aa7b2faf5f464e7
Author: Martin Zink <ma...@apache.org>
AuthorDate: Thu Feb 12 14:44:59 2026 +0100
fix
---
behave_framework/src/minifi_test_framework/containers/container.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/behave_framework/src/minifi_test_framework/containers/container.py b/behave_framework/src/minifi_test_framework/containers/container.py
index 90657fbe8..fe5c3db19 100644
--- a/behave_framework/src/minifi_test_framework/containers/container.py
+++ b/behave_framework/src/minifi_test_framework/containers/container.py
@@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import annotations
from typing import TYPE_CHECKING
import json
(nifi-minifi-cpp) 02/05: review changes
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
martinzink pushed a commit to branch MINIFICPP-2711
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 18c6efafbaaaf81ae1cf7353e67779b93d0c2cd7
Author: Martin Zink <ma...@apache.org>
AuthorDate: Fri Feb 6 14:56:05 2026 +0100
review changes
---
extensions/gcp/tests/features/steps/fake_gcs_server_container.py | 2 +-
extensions/grafana-loki/tests/features/steps/grafana_loki_container.py | 2 +-
extensions/kafka/tests/features/steps/kafka_server_container.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/extensions/gcp/tests/features/steps/fake_gcs_server_container.py b/extensions/gcp/tests/features/steps/fake_gcs_server_container.py
index b55b7aaff..a9733ba4e 100644
--- a/extensions/gcp/tests/features/steps/fake_gcs_server_container.py
+++ b/extensions/gcp/tests/features/steps/fake_gcs_server_container.py
@@ -33,7 +33,7 @@ class FakeGcsServerContainer(Container):
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=30,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
@retry_check()
def check_google_cloud_storage(self, content):
diff --git a/extensions/grafana-loki/tests/features/steps/grafana_loki_container.py b/extensions/grafana-loki/tests/features/steps/grafana_loki_container.py
index 8a3e3fc7a..32f1cf1db 100644
--- a/extensions/grafana-loki/tests/features/steps/grafana_loki_container.py
+++ b/extensions/grafana-loki/tests/features/steps/grafana_loki_container.py
@@ -133,7 +133,7 @@ analytics:
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=120,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
@retry_check()
def are_lines_present(self, lines: str, timeout: int, ssl: bool, tenant_id: str = "") -> bool:
diff --git a/extensions/kafka/tests/features/steps/kafka_server_container.py b/extensions/kafka/tests/features/steps/kafka_server_container.py
index 6a68f9611..30073186f 100644
--- a/extensions/kafka/tests/features/steps/kafka_server_container.py
+++ b/extensions/kafka/tests/features/steps/kafka_server_container.py
@@ -95,7 +95,7 @@ Client {
condition=lambda: finished_str in self.get_logs(),
timeout_seconds=60,
bail_condition=lambda: self.exited,
- context=None)
+ context=context)
def create_topic(self, topic_name: str):
(code, output) = self.exec_run(["/bin/sh", "-c", f"/opt/kafka/bin/kafka-topics.sh --create --topic '{topic_name}' --bootstrap-server '{self.container_name}':9092"])
(nifi-minifi-cpp) 03/05: review changes
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
martinzink pushed a commit to branch MINIFICPP-2711
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 49b463f8140b9f78cd690417f68c4310707280b9
Author: Martin Zink <ma...@apache.org>
AuthorDate: Thu Feb 12 13:59:22 2026 +0100
review changes
---
behave_framework/src/minifi_test_framework/containers/container.py | 2 +-
behave_framework/src/minifi_test_framework/steps/core_steps.py | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/behave_framework/src/minifi_test_framework/containers/container.py b/behave_framework/src/minifi_test_framework/containers/container.py
index cf87e2208..62180f3c1 100644
--- a/behave_framework/src/minifi_test_framework/containers/container.py
+++ b/behave_framework/src/minifi_test_framework/containers/container.py
@@ -101,7 +101,7 @@ class Container:
def is_deployed(self) -> bool:
return self.container is not None
- def deploy(self, context: "Union[MinifiTestContext, None]") -> bool:
+ def deploy(self, context: MinifiTestContext | None) -> bool:
if self.is_deployed():
logging.info(f"Container '{self.container_name}' is already deployed.")
return True
diff --git a/behave_framework/src/minifi_test_framework/steps/core_steps.py b/behave_framework/src/minifi_test_framework/steps/core_steps.py
index 4c118d6b4..a8bf7780b 100644
--- a/behave_framework/src/minifi_test_framework/steps/core_steps.py
+++ b/behave_framework/src/minifi_test_framework/steps/core_steps.py
@@ -46,11 +46,6 @@ def step_impl(context: MinifiTestContext):
logging.debug("MiNiFi instance started up")
-@when("the MiNiFi instance is started without assertions")
-def step_impl(context: MinifiTestContext):
- context.get_or_create_default_minifi_container().deploy(context)
-
-
@step('a directory at "{directory}" has a file with the size "{size}"')
def step_impl(context: MinifiTestContext, directory: str, size: str):
size = humanfriendly.parse_size(size)