fgerlits commented on code in PR #1322:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1322#discussion_r866877570
##########
docker/test/integration/minifi/core/KindProxy.py:
##########
@@ -93,14 +102,23 @@ def __create_objects_of_type(self, directory, type):
file_name_in_container = os.path.join('/var/tmp', file_name)
self.__copy_file_to_container(full_file_name,
'kind-control-plane', file_name_in_container)
- (code, output) =
self.docker_client.containers.get('kind-control-plane').exec_run(['kubectl',
'apply', '-f', file_name_in_container])
+ (code, _) =
self.docker_client.containers.get('kind-control-plane').exec_run(['kubectl',
'apply', '-f', file_name_in_container])
if code != 0:
raise Exception("Could not create kubernetes object from file
'%s'" % full_file_name)
object_name = file_name.replace(f'.{type}.yml', '')
found_objects.append(object_name)
return found_objects
+ def __delete_objects_of_type(self, type):
+ for full_file_name in
glob.iglob(os.path.join(self.resources_directory, f'*.{type}.yml')):
+ file_name = os.path.basename(full_file_name)
+ file_name_in_container = os.path.join('/var/tmp', file_name)
+
+ (code, _) =
self.docker_client.containers.get('kind-control-plane').exec_run(['kubectl',
'delete', '-f', file_name_in_container, '--grace-period=0', '--force'])
+ if code != 0:
+ raise Exception("Could not delete kubernetes object from file
'%s'" % file_name_in_container)
Review Comment:
Right, I misread this, I thought it was only deleting the file. Never mind.
--
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]