Skip to content

Commit 32a11ab

Browse files
committed
MINIFICPP-2718 Windows based docker tests
1 parent f125497 commit 32a11ab

38 files changed

+1038
-240
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ cmake_install.cmake
4444
install_manifest.txt
4545
CTestTestfile.cmake
4646
cmake-build-debug
47+
venv
48+
behave_venv
4749

4850
# Generated files
4951
*flowfile_checkpoint

behave_framework/pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
[project]
22
name = "minifi-test-framework"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
requires-python = ">= 3.10"
55
description = "A testing framework for MiNiFi extensions."
66
dependencies = [
77
"behavex==4.6.0",
88
"docker==7.1.0",
99
"PyYAML==6.0.3",
1010
"humanfriendly==10.0",
11-
"m2crypto==0.46.2",
12-
"pyopenssl==25.0.0",
11+
"cryptography==46.0.5",
1312
"pyjks==20.0.0"
1413
]
1514

behave_framework/src/minifi_test_framework/containers/container.py renamed to behave_framework/src/minifi_test_framework/containers/container_linux.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import docker
2828
from docker.models.networks import Network
2929

30+
from minifi_test_framework.containers.container_protocol import ContainerProtocol
3031
from minifi_test_framework.containers.directory import Directory
3132
from minifi_test_framework.containers.file import File
3233
from minifi_test_framework.containers.host_file import HostFile
@@ -35,8 +36,9 @@
3536
from minifi_test_framework.core.minifi_test_context import MinifiTestContext
3637

3738

38-
class Container:
39+
class LinuxContainer(ContainerProtocol):
3940
def __init__(self, image_name: str, container_name: str, network: Network, command: str | None = None, entrypoint: str | None = None):
41+
super().__init__()
4042
self.image_name: str = image_name
4143
self.container_name: str = container_name
4244
self.network: Network = network
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
from typing import Protocol
2+
3+
4+
class ContainerProtocol(Protocol):
5+
def deploy(self, context) -> bool:
6+
...
7+
8+
def clean_up(self):
9+
...
10+
11+
def exec_run(self, command):
12+
...
13+
14+
def directory_contains_file_with_content(self, directory_path: str, expected_content: str) -> bool:
15+
...
16+
17+
def directory_contains_file_with_regex(self, directory_path: str, regex_str: str) -> bool:
18+
...
19+
20+
def path_with_content_exists(self, path: str, content: str) -> bool:
21+
...
22+
23+
def get_logs(self) -> str:
24+
...
25+
26+
@property
27+
def exited(self) -> bool:
28+
...
29+
30+
def get_number_of_files(self, directory_path: str) -> int:
31+
...
32+
33+
def verify_file_contents(self, directory_path: str, expected_contents: list[str]) -> bool:
34+
...
35+
36+
def log_app_output(self) -> bool:
37+
...

0 commit comments

Comments
 (0)