aminadinari19 commented on a change in pull request #1121:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1121#discussion_r680637929
##########
File path: docker/test/integration/minifi/core/Container.py
##########
@@ -0,0 +1,102 @@
+import docker
+import logging
+import tarfile
+from io import BytesIO
+
+
+class Container:
+ def __init__(self, name, engine, vols, network):
+ self.name = name
+ self.engine = engine
+ self.vols = vols
+ self.network = network
+
+ # Get docker client
+ self.client = docker.from_env()
+ self.image = None
+ self.deployed = False
+
+ def __del__(self):
+ self.cleanup()
+
+ def cleanup(self):
+ logging.info('Cleaning up container: %s', self.name)
+ try:
+ self.client.containers.get(self.name).remove(v=True, force=True)
+ except docker.errors.NotFound:
Review comment:
Just wondering if it should log anything over here regarding the
container cleanup or is that not needed?
--
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]