Skip to content

Commit

Permalink
Add initial milvus container testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmueller committed Dec 16, 2024
1 parent 9db04a5 commit c40a78e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
10 changes: 10 additions & 0 deletions bci_tester/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,14 @@ def create_BCI(
forwarded_ports=[PortForwarding(container_port=8080)],
)

MILVUS_CONTAINER = create_BCI(
build_tag=f"{SAC_CONTAINER_PREFIX}/milvus:2.4",
bci_type=ImageType.SAC_APPLICATION,
available_versions=["15.6-ai"],
custom_entry_point="/bin/bash",
)


CONTAINERS_WITH_ZYPPER = (
[
BASE_CONTAINER,
Expand Down Expand Up @@ -1047,6 +1055,7 @@ def create_BCI(
MICRO_CONTAINER,
MINIMAL_CONTAINER,
OLLAMA_CONTAINER,
MILVUS_CONTAINER,
*POSTFIX_CONTAINERS,
*TOMCAT_CONTAINERS,
*POSTGRESQL_CONTAINERS,
Expand Down Expand Up @@ -1076,6 +1085,7 @@ def create_BCI(
PHP_8_FPM,
OLLAMA_CONTAINER,
OPENWEBUI_CONTAINER,
MILVUS_CONTAINER,
]
+ BASE_FIPS_CONTAINERS
+ CONTAINER_389DS_CONTAINERS
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ markers = [
'git_latest',
'helm_3',
'helm_latest',
'milvus_2.4',
'nginx_1.21',
'nginx_latest',
'golang_oldstable',
Expand Down
22 changes: 18 additions & 4 deletions tests/test_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
from tenacity import stop_after_attempt
from tenacity import wait_exponential

from bci_tester.data import MILVUS_CONTAINER
from bci_tester.data import OLLAMA_CONTAINER
from bci_tester.data import OPENWEBUI_CONTAINER

CONTAINER_IMAGES = (
OLLAMA_CONTAINER,
OPENWEBUI_CONTAINER,
)
CONTAINER_IMAGES = (OLLAMA_CONTAINER, OPENWEBUI_CONTAINER, MILVUS_CONTAINER)


@pytest.mark.parametrize(
Expand Down Expand Up @@ -57,3 +55,19 @@ def check_openwebui_response():
assert ":true" in resp.text

check_openwebui_response()


@pytest.mark.parametrize(
"container_per_test",
[MILVUS_CONTAINER],
indirect=["container_per_test"],
)
def test_milvus_health(container_per_test):
"""Test the milvus container."""

# doesn't allow running outside kubernetes as far as I can see
container_per_test.connection.check_output(
"minio-client -q --dp --version"
)
container_per_test.connection.check_output("etcd --version")
container_per_test.connection.check_output("milvus")
2 changes: 2 additions & 0 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from bci_tester.data import MARIADB_CLIENT_CONTAINERS
from bci_tester.data import MARIADB_CONTAINERS
from bci_tester.data import MICRO_CONTAINER
from bci_tester.data import MILVUS_CONTAINER
from bci_tester.data import MINIMAL_CONTAINER
from bci_tester.data import NGINX_CONTAINER
from bci_tester.data import NODEJS_18_CONTAINER
Expand Down Expand Up @@ -289,6 +290,7 @@ def _get_container_label_prefix(
+ [
(OLLAMA_CONTAINER, "ollama", ImageType.SAC_APPLICATION),
(OPENWEBUI_CONTAINER, "open-webui", ImageType.SAC_APPLICATION),
(MILVUS_CONTAINER, "milvus", ImageType.SAC_APPLICATION),
]
]

Expand Down

0 comments on commit c40a78e

Please sign in to comment.