File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
tests/model_registry/image_validation Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 77 validate_container_images ,
88)
99from ocp_resources .pod import Pod
10+ from tests .model_registry .utils import get_model_catalog_pod
1011
1112LOGGER = get_logger (name = __name__ )
1213
@@ -33,10 +34,14 @@ def test_verify_model_registry_images(
3334 admin_client : DynamicClient ,
3435 model_registry_operator_pod : Pod ,
3536 model_registry_instance_pod_by_label : Pod ,
37+ model_registry_namespace : str ,
3638 related_images_refs : Set [str ],
3739 ):
40+ model_catalog_pod = get_model_catalog_pod (
41+ client = admin_client , model_registry_namespace = model_registry_namespace
42+ )[0 ]
3843 validation_errors = []
39- for pod in [model_registry_operator_pod , model_registry_instance_pod_by_label ]:
44+ for pod in [model_registry_operator_pod , model_registry_instance_pod_by_label , model_catalog_pod ]:
4045 validation_errors .extend (
4146 validate_container_images (
4247 pod = pod , valid_image_refs = related_images_refs , skip_patterns = ["openshift-service-mesh" ]
Original file line number Diff line number Diff line change @@ -196,7 +196,10 @@ def get_pod_images(pod: Pod) -> List[str]:
196196 Returns:
197197 List of container image strings
198198 """
199- return [container .image for container in pod .instance .spec .containers ]
199+ containers = [container .image for container in pod .instance .spec .containers ]
200+ if pod .instance .spec .initContainers :
201+ containers .extend ([init .image for init in pod .instance .spec .initContainers ])
202+ return containers
200203
201204
202205def validate_image_format (image : str ) -> Tuple [bool , str ]:
You can’t perform that action at this time.
0 commit comments