martinzink commented on code in PR #1574:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1574#discussion_r1223096958
##########
docker/test/integration/features/MiNiFi_integration_test_driver.py:
##########
@@ -37,48 +40,68 @@
class MiNiFi_integration_test:
- def __init__(self, context):
- self.test_id = context.test_id
- self.cluster = DockerTestCluster(context)
+ def __init__(self, context, feature_id: str):
+ self.feature_id = feature_id
+ self.cluster = DockerTestCluster(context, feature_id=feature_id)
self.connectable_nodes = []
# Remote process groups are not connectables
self.remote_process_groups = []
self.file_system_observer = None
self.docker_directory_bindings = context.directory_bindings
-
self.cluster.set_directory_bindings(self.docker_directory_bindings.get_directory_bindings(self.test_id),
self.docker_directory_bindings.get_data_directories(self.test_id))
+
self.cluster.set_directory_bindings(self.docker_directory_bindings.get_directory_bindings(self.feature_id),
self.docker_directory_bindings.get_data_directories(self.feature_id))
+ self.root_ca_cert, self.root_ca_key = make_ca("root CA")
+
+ minifi_client_cert, minifi_client_key =
make_client_cert(common_name=f"minifi-cpp-flow-{self.feature_id}",
+
ca_cert=self.root_ca_cert,
+
ca_key=self.root_ca_key)
+ self.put_test_resource('root_ca.crt',
+
OpenSSL.crypto.dump_certificate(type=OpenSSL.crypto.FILETYPE_PEM,
+
cert=self.root_ca_cert))
+
+ self.put_test_resource('minifi_client.crt',
+
OpenSSL.crypto.dump_certificate(type=OpenSSL.crypto.FILETYPE_PEM,
+
cert=minifi_client_cert))
+ self.put_test_resource('minifi_client.key',
+
OpenSSL.crypto.dump_privatekey(type=OpenSSL.crypto.FILETYPE_PEM,
+
pkey=minifi_client_key))
+
+ def get_container_name_with_postfix(self, container_name: str):
+ return
self.cluster.container_store.get_container_name_with_postfix(container_name)
def cleanup(self):
self.cluster.cleanup()
+ if self.file_system_observer:
+ self.file_system_observer.observer.unschedule_all()
- def acquire_container(self, name, engine='minifi-cpp', command=None):
- return self.cluster.acquire_container(name, engine, command)
+ def acquire_container(self, context, name, engine='minifi-cpp',
command=None):
Review Comment:
good idea, I've introduced FeatureContext in
https://github.com/apache/nifi-minifi-cpp/pull/1574/commits/94d5a6fc0a0263283376dcfa7d46d655b22e1828
and
https://github.com/apache/nifi-minifi-cpp/pull/1574/commits/69e035b345f3298650fa482fc74227d4fb080271
--
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]