From d87a0561886db0a99b63a2f34959d51fcae58dc1 Mon Sep 17 00:00:00 2001 From: MichaelClifford Date: Sun, 6 Aug 2023 20:08:06 -0400 Subject: [PATCH] update tests --- tests/test-case.yaml | 6 +++--- tests/unit_test.py | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/test-case.yaml b/tests/test-case.yaml index 5a9b5ca64..63cf73fd6 100644 --- a/tests/test-case.yaml +++ b/tests/test-case.yaml @@ -6,7 +6,7 @@ metadata: name: unit-test-cluster namespace: ns spec: - priority: 5 + priority: 9 resources: GenericItems: - custompodresources: @@ -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 @@ -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 diff --git a/tests/unit_test.py b/tests/unit_test.py index b2d30cc1f..9880b4ce2 100644 --- a/tests/unit_test.py +++ b/tests/unit_test.py @@ -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() @@ -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")