Skip to content

Commit

Permalink
Tests for the annotation prefix to RayCluster
Browse files Browse the repository at this point in the history
  • Loading branch information
Ygnas authored and openshift-merge-bot[bot] committed Jun 11, 2024
1 parent 4cef42e commit 2408b7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test-case-no-mcad.yamls
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
apiVersion: ray.io/v1
kind: RayCluster
metadata:
annotations:
app.kubernetes.io/managed-by: test-prefix
labels:
controller-tools.k8s.io: '1.0'
kueue.x-k8s.io/queue-name: local-queue-default
Expand Down
3 changes: 3 additions & 0 deletions tests/unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ def test_cluster_creation_no_mcad(mocker):
"kubernetes.client.CustomObjectsApi.list_namespaced_custom_object",
return_value=get_local_queue("kueue.x-k8s.io", "v1beta1", "ns", "localqueues"),
)
mocker.patch("os.environ.get", return_value="test-prefix")

config = createClusterConfig()
config.name = "unit-test-cluster-ray"
config.write_to_file = True
Expand Down Expand Up @@ -373,6 +375,7 @@ def test_cluster_creation_no_mcad_local_queue(mocker):
"kubernetes.client.CustomObjectsApi.list_namespaced_custom_object",
return_value=get_local_queue("kueue.x-k8s.io", "v1beta1", "ns", "localqueues"),
)
mocker.patch("os.environ.get", return_value="test-prefix")
config = createClusterConfig()
config.name = "unit-test-cluster-ray"
config.appwrapper = False
Expand Down

0 comments on commit 2408b7a

Please sign in to comment.