Skip to content

Commit

Permalink
Enable metadata tests for the AI images
Browse files Browse the repository at this point in the history
  • Loading branch information
dcermak committed Nov 27, 2024
1 parent 967102e commit a7ac61b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bci_tester/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,8 @@ def create_BCI(
PHP_8_APACHE,
PHP_8_CLI,
PHP_8_FPM,
OLLAMA_CONTAINER,
OPENWEBUI_CONTAINER,
]
+ BASE_FIPS_CONTAINERS
+ CONTAINER_389DS_CONTAINERS
Expand Down
11 changes: 9 additions & 2 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
from bci_tester.data import NODEJS_18_CONTAINER
from bci_tester.data import NODEJS_20_CONTAINER
from bci_tester.data import NODEJS_22_CONTAINER
from bci_tester.data import OLLAMA_CONTAINER
from bci_tester.data import OPENJDK_11_CONTAINER
from bci_tester.data import OPENJDK_17_CONTAINER
from bci_tester.data import OPENJDK_21_CONTAINER
Expand All @@ -69,8 +70,10 @@
from bci_tester.data import OPENJDK_DEVEL_17_CONTAINER
from bci_tester.data import OPENJDK_DEVEL_21_CONTAINER
from bci_tester.data import OPENJDK_DEVEL_23_CONTAINER
from bci_tester.data import OPENWEBUI_CONTAINER
from bci_tester.data import OS_SP_VERSION
from bci_tester.data import OS_VERSION
from bci_tester.data import OS_VERSION_ID
from bci_tester.data import PCP_CONTAINERS
from bci_tester.data import PHP_8_APACHE
from bci_tester.data import PHP_8_CLI
Expand Down Expand Up @@ -278,6 +281,10 @@ def _get_container_label_prefix(
(cont, "base-fips", ImageType.OS_LTSS)
for cont in LTSS_BASE_FIPS_CONTAINERS
]
+ [
(OLLAMA_CONTAINER, "ollama", ImageType.SAC_APPLICATION),
(OPENWEBUI_CONTAINER, "open-webui", ImageType.SAC_APPLICATION),
]
]


Expand Down Expand Up @@ -378,7 +385,7 @@ def test_general_labels(
# no EULA for openSUSE images
else:
assert (
labels["com.suse.lifecycle-url"]
labels["com.suse.lifecycle-url"].removesuffix("/")
in (
"https://www.suse.com/lifecycle#suse-linux-enterprise-server-15",
"https://www.suse.com/lifecycle", # SLE 15 SP5 base container has incorrect URL
Expand Down Expand Up @@ -670,7 +677,7 @@ def test_oci_base_refs(

assert base_name.startswith("registry.suse.com/")
assert (
f":{OS_VERSION}" in base_name
f":{OS_VERSION_ID}" in base_name
), "Base image reference is not the expected version"
assert base_digest.startswith("sha256:")

Expand Down

0 comments on commit a7ac61b

Please sign in to comment.