Skip to content

Commit 56479d1

Browse files
committed
Updated unit test for user labels
1 parent e2cc8e1 commit 56479d1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Diff for: tests/test-case-no-mcad.yamls

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ metadata:
55
labels:
66
controller-tools.k8s.io: '1.0'
77
kueue.x-k8s.io/queue-name: local-queue-default
8+
testlabel: test
9+
testlabel2: test
810
name: unit-test-cluster-ray
911
namespace: ns
1012
spec:

Diff for: tests/unit_test.py

+3
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ def test_cluster_creation_no_mcad(mocker):
324324
config.name = "unit-test-cluster-ray"
325325
config.write_to_file = True
326326
config.mcad = False
327+
config.user_labels = {"testlabel": "test", "testlabel2": "test"}
327328
cluster = Cluster(config)
328329

329330
assert cluster.app_wrapper_yaml == f"{aw_dir}unit-test-cluster-ray.yaml"
@@ -348,6 +349,7 @@ def test_cluster_creation_no_mcad_local_queue(mocker):
348349
config.mcad = False
349350
config.write_to_file = True
350351
config.local_queue = "local-queue-default"
352+
config.user_labels = {"testlabel": "test", "testlabel2": "test"}
351353
cluster = Cluster(config)
352354
assert cluster.app_wrapper_yaml == f"{aw_dir}unit-test-cluster-ray.yaml"
353355
assert cluster.app_wrapper_name == "unit-test-cluster-ray"
@@ -373,6 +375,7 @@ def test_cluster_creation_no_mcad_local_queue(mocker):
373375
write_to_file=True,
374376
mcad=False,
375377
local_queue="local-queue-default",
378+
user_labels={"testlabel": "test", "testlabel2": "test"},
376379
)
377380
cluster = Cluster(config)
378381
assert cluster.app_wrapper_yaml == f"{aw_dir}unit-test-cluster-ray.yaml"

0 commit comments

Comments
 (0)