Skip to content

Commit 2408b7a

Browse files
Ygnasopenshift-merge-bot[bot]
authored andcommitted
Tests for the annotation prefix to RayCluster
1 parent 4cef42e commit 2408b7a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/test-case-no-mcad.yamls

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
apiVersion: ray.io/v1
33
kind: RayCluster
44
metadata:
5+
annotations:
6+
app.kubernetes.io/managed-by: test-prefix
57
labels:
68
controller-tools.k8s.io: '1.0'
79
kueue.x-k8s.io/queue-name: local-queue-default

tests/unit_test.py

+3
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ def test_cluster_creation_no_mcad(mocker):
345345
"kubernetes.client.CustomObjectsApi.list_namespaced_custom_object",
346346
return_value=get_local_queue("kueue.x-k8s.io", "v1beta1", "ns", "localqueues"),
347347
)
348+
mocker.patch("os.environ.get", return_value="test-prefix")
349+
348350
config = createClusterConfig()
349351
config.name = "unit-test-cluster-ray"
350352
config.write_to_file = True
@@ -373,6 +375,7 @@ def test_cluster_creation_no_mcad_local_queue(mocker):
373375
"kubernetes.client.CustomObjectsApi.list_namespaced_custom_object",
374376
return_value=get_local_queue("kueue.x-k8s.io", "v1beta1", "ns", "localqueues"),
375377
)
378+
mocker.patch("os.environ.get", return_value="test-prefix")
376379
config = createClusterConfig()
377380
config.name = "unit-test-cluster-ray"
378381
config.appwrapper = False

0 commit comments

Comments
 (0)