From 61086d5958ff6a18668dc445ac9e3699a7241c31 Mon Sep 17 00:00:00 2001 From: Tian Xia Date: Thu, 28 Dec 2023 00:41:26 -0800 Subject: [PATCH] [Tests] Fix `test_jobs` (#2651) * fix * cahnge to monkeypatch --- tests/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/common.py b/tests/common.py index a8a33fa3f5d..4d15fd46374 100644 --- a/tests/common.py +++ b/tests/common.py @@ -51,6 +51,12 @@ def _get_az_mappings(_): 'sky.clouds.utils.gcp_utils.list_reservations_for_instance_type_in_zone', lambda *_args, **_kwargs: []) + for cloud in enabled_clouds: + if hasattr(cloud, 'check_quota_available'): + attr = (f'{cloud.__module__}.{cloud.__class__.__name__}.' + 'check_quota_available') + monkeypatch.setattr(attr, lambda *_args, **_kwargs: True) + # Monkey patch Kubernetes resource detection since it queries # the cluster to detect available cluster resources. monkeypatch.setattr(