This is an automated email from the ASF dual-hosted git repository.
martinzink pushed a commit to branch apache-rusty
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
The following commit(s) were added to refs/heads/apache-rusty by this push:
new 3dbdb934a win docker improvements
3dbdb934a is described below
commit 3dbdb934a71be7b71f385df93c290a83102c3859
Author: Martin Zink <[email protected]>
AuthorDate: Fri Feb 20 09:45:33 2026 +0100
win docker improvements
---
.../containers/container_windows.py | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git
a/behave_framework/src/minifi_test_framework/containers/container_windows.py
b/behave_framework/src/minifi_test_framework/containers/container_windows.py
index 2418d3ccf..948bd0b96 100644
--- a/behave_framework/src/minifi_test_framework/containers/container_windows.py
+++ b/behave_framework/src/minifi_test_framework/containers/container_windows.py
@@ -369,3 +369,38 @@ class WindowsContainer(ContainerProtocol):
]
return sorted(actual_file_contents) == sorted(normalized_expected)
+
+ def nonempty_dir_exists(self, directory_path: str) -> bool:
+ if not self.container:
+ return False
+
+ command = (
+ f"powershell -Command \"if ((Test-Path -LiteralPath
'{directory_path}' -PathType Container) "
+ f"-and (Get-ChildItem -LiteralPath '{directory_path}' -Force |
Select-Object -First 1)) "
+ f"{{ exit 0 }} else {{ exit 1 }}\""
+ )
+
+ exit_code, _ = self.exec_run(command)
+
+ return exit_code == 0
+
+ def directory_contains_file_with_minimum_size(self, directory_path: str,
expected_size: int) -> bool:
+ if not self.container or not self.nonempty_dir_exists(directory_path):
+ return False
+
+ command = (
+ f"powershell -Command \"Get-ChildItem -LiteralPath
'{directory_path}' -File "
+ f"| Where-Object {{ $_.Length -gt {expected_size} }}\""
+ )
+
+ exit_code, output = self.exec_run(command)
+
+ if exit_code != 0:
+ logging.error(f"Error running command to get file sizes: {output}")
+ return False
+
+ # If PowerShell returns any text, it means it found files matching the
criteria
+ if output and len(output.strip()) > 0:
+ return True
+
+ return False