Skip to content

Commit e09cdf7

Browse files
update tests
1 parent 957fc35 commit e09cdf7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

tests/test-case.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
name: unit-test-cluster
77
namespace: ns
88
spec:
9-
priority: 5
9+
priority: 9
1010
resources:
1111
GenericItems:
1212
- custompodresources:
@@ -109,6 +109,7 @@ spec:
109109
nvidia.com/gpu: 0
110110
imagePullSecrets:
111111
- name: unit-test-pull-secret
112+
priorityClassName: default
112113
rayVersion: 2.5.0
113114
workerGroupSpecs:
114115
- groupName: small-group-unit-test-cluster
@@ -176,7 +177,7 @@ spec:
176177
do echo waiting for myservice; sleep 2; done
177178
image: busybox:1.28
178179
name: init-myservice
179-
priorityClassName: default-priority
180+
priorityClassName: default
180181
replicas: 1
181182
- generictemplate:
182183
apiVersion: route.openshift.io/v1
@@ -192,7 +193,7 @@ spec:
192193
to:
193194
kind: Service
194195
name: unit-test-cluster-head-svc
195-
replica: 1
196+
replicas: 1
196197
Items: []
197198
schedulingSpec:
198199
minAvailable: 3

tests/unit_test.py

+4
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ def test_cluster_up_down(mocker):
302302
"kubernetes.client.CustomObjectsApi.delete_namespaced_custom_object",
303303
side_effect=arg_check_del_effect,
304304
)
305+
mocker.patch(
306+
"kubernetes.client.CustomObjectsApi.list_cluster_custom_object",
307+
return_value={"items": []},
308+
)
305309
cluster = test_cluster_creation()
306310
cluster.up()
307311
cluster.down()

0 commit comments

Comments
 (0)