Skip to content

Commit 9d681ae

Browse files
committed
feat: add fixture for trustyai operator deployment
1 parent b5373c4 commit 9d681ae

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

tests/model_explainability/trustyai_operator/test_trustyai_operator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
from kubernetes.dynamic import DynamicClient
23
from ocp_resources.config_map import ConfigMap
34
from ocp_resources.deployment import Deployment
45

@@ -7,7 +8,7 @@
78

89
@pytest.mark.smoke
910
def test_validate_trustyai_operator_image(
10-
admin_client,
11+
admin_client: DynamicClient,
1112
related_images_refs: set[str],
1213
trustyai_operator_configmap: ConfigMap,
1314
trustyai_operator_deployment: Deployment,

tests/model_explainability/trustyai_operator/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ def validate_trustyai_operator_image(
1111
- container image matches that of the operator configmap.
1212
- image is present in relatedImages of CSV.
1313
- image complies with OpenShift AI requirements i.e. sourced from registry.redhat.io and pinned w/o tags.
14+
15+
Args:
16+
related_images_refs (set[str]): set of related image refs from the RHOAI CSV
17+
tai_operator_configmap_data (dict[str, str]): TrustyAI configmap data
18+
tai_operator_deployment (Deployment): TrustyAI deployment object
19+
20+
Returns:
21+
None
1422
"""
1523
tai_operator_image = tai_operator_deployment.instance.spec.template.spec.containers[0].image
1624
assert tai_operator_image == tai_operator_configmap_data["trustyaiOperatorImage"]

0 commit comments

Comments
 (0)