Skip to content

Commit 8f08a9d

Browse files
update tests
1 parent 962d918 commit 8f08a9d

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
@@ -257,6 +257,10 @@ def test_cluster_up_down(mocker):
257257
"kubernetes.client.CustomObjectsApi.delete_namespaced_custom_object",
258258
side_effect=arg_check_del_effect,
259259
)
260+
mocker.patch(
261+
"kubernetes.client.CustomObjectsApi.list_cluster_custom_object",
262+
return_value={"items": []},
263+
)
260264
cluster = test_cluster_creation()
261265
cluster.up()
262266
cluster.down()
@@ -2219,7 +2223,7 @@ def test_export_env():
22192223

22202224
# Make sure to always keep this function last
22212225
def test_cleanup():
2222-
os.remove("unit-test-cluster.yaml")
2226+
# os.remove("unit-test-cluster.yaml")
22232227
os.remove("unit-test-default-cluster.yaml")
22242228
os.remove("test.yaml")
22252229
os.remove("raytest2.yaml")

0 commit comments

Comments
 (0)