Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelClifford committed Aug 7, 2023
1 parent 33e32d4 commit d87a056
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/test-case.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: unit-test-cluster
namespace: ns
spec:
priority: 5
priority: 9
resources:
GenericItems:
- custompodresources:
Expand Down Expand Up @@ -109,7 +109,7 @@ spec:
nvidia.com/gpu: 0
imagePullSecrets:
- name: unit-test-pull-secret
priorityClassName: default-priority
priorityClassName: default
rayVersion: 2.1.0
workerGroupSpecs:
- groupName: small-group-unit-test-cluster
Expand Down Expand Up @@ -177,7 +177,7 @@ spec:
do echo waiting for myservice; sleep 2; done
image: busybox:1.28
name: init-myservice
priorityClassName: default-priority
priorityClassName: default
replicas: 1
- generictemplate:
apiVersion: route.openshift.io/v1
Expand Down
6 changes: 5 additions & 1 deletion tests/unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ def test_cluster_up_down(mocker):
"kubernetes.client.CustomObjectsApi.delete_namespaced_custom_object",
side_effect=arg_check_del_effect,
)
mocker.patch(
"kubernetes.client.CustomObjectsApi.list_cluster_custom_object",
return_value={"items": []},
)
cluster = test_cluster_creation()
cluster.up()
cluster.down()
Expand Down Expand Up @@ -2215,7 +2219,7 @@ def test_export_env():

# Make sure to always keep this function last
def test_cleanup():
os.remove("unit-test-cluster.yaml")
# os.remove("unit-test-cluster.yaml")
os.remove("unit-test-default-cluster.yaml")
os.remove("test.yaml")
os.remove("raytest2.yaml")
Expand Down

0 comments on commit d87a056

Please sign in to comment.