summaryrefslogtreecommitdiff
path: root/tests/unittests/sources/test_cloudstack.py
diff options
context:
space:
mode:
authorBrett Holman <brett.holman@canonical.com>2022-06-30 13:23:20 -0600
committerGitHub <noreply@github.com>2022-06-30 14:23:20 -0500
commit1fcd55d6c5da730484b8e24df1bbe53b5afc278c (patch)
treefd351dd6692f1299bd302ecc6d8bcc7fefda959f /tests/unittests/sources/test_cloudstack.py
parent0501262cebaaf501d90c55bb399c0637de088e9c (diff)
downloadcloud-init-git-1fcd55d6c5da730484b8e24df1bbe53b5afc278c.tar.gz
tests: mock dns lookup that causes long timeouts (#1555)
Diffstat (limited to 'tests/unittests/sources/test_cloudstack.py')
-rw-r--r--tests/unittests/sources/test_cloudstack.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittests/sources/test_cloudstack.py b/tests/unittests/sources/test_cloudstack.py
index f7c69f91..b37400d3 100644
--- a/tests/unittests/sources/test_cloudstack.py
+++ b/tests/unittests/sources/test_cloudstack.py
@@ -40,6 +40,11 @@ class TestCloudStackPasswordFetching(CiTestCase):
get_networkd_server_address,
)
)
+ get_data_server = mock.MagicMock(return_value=None)
+ self.patches.enter_context(
+ mock.patch(mod_name + ".get_data_server", get_data_server)
+ )
+
self.tmp = self.tmp_dir()
def _set_password_server_response(self, response_string):