Skip to content

Commit d87a056

Browse files
update tests
1 parent 33e32d4 commit d87a056

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

tests/test-case.yaml

+3-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,7 +109,7 @@ spec:
109109
nvidia.com/gpu: 0
110110
imagePullSecrets:
111111
- name: unit-test-pull-secret
112-
priorityClassName: default-priority
112+
priorityClassName: default
113113
rayVersion: 2.1.0
114114
workerGroupSpecs:
115115
- groupName: small-group-unit-test-cluster
@@ -177,7 +177,7 @@ spec:
177177
do echo waiting for myservice; sleep 2; done
178178
image: busybox:1.28
179179
name: init-myservice
180-
priorityClassName: default-priority
180+
priorityClassName: default
181181
replicas: 1
182182
- generictemplate:
183183
apiVersion: route.openshift.io/v1

tests/unit_test.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ def test_cluster_up_down(mocker):
256256
"kubernetes.client.CustomObjectsApi.delete_namespaced_custom_object",
257257
side_effect=arg_check_del_effect,
258258
)
259+
mocker.patch(
260+
"kubernetes.client.CustomObjectsApi.list_cluster_custom_object",
261+
return_value={"items": []},
262+
)
259263
cluster = test_cluster_creation()
260264
cluster.up()
261265
cluster.down()
@@ -2215,7 +2219,7 @@ def test_export_env():
22152219

22162220
# Make sure to always keep this function last
22172221
def test_cleanup():
2218-
os.remove("unit-test-cluster.yaml")
2222+
# os.remove("unit-test-cluster.yaml")
22192223
os.remove("unit-test-default-cluster.yaml")
22202224
os.remove("test.yaml")
22212225
os.remove("raytest2.yaml")

0 commit comments

Comments
 (0)