File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
tests/unit/plugins/module_utils Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 99from ansible_collections .scale_computing .hypercore .plugins .module_utils .cluster import (
1010 Cluster ,
1111)
12+ from ansible_collections .scale_computing .hypercore .plugins .module_utils .errors import (
13+ ScaleTimeoutError ,
14+ )
1215from ansible_collections .scale_computing .hypercore .plugins .module_utils .utils import (
1316 MIN_PYTHON_VERSION ,
1417)
@@ -111,6 +114,8 @@ def test_cluster_update_name(self, rest_client):
111114
112115 def test_cluster_shutdown (self , rest_client ):
113116 force_shutdown = True
117+ rest_client .create_record .side_effect = ScaleTimeoutError ("Timeout error" )
118+ rest_client .get_record .side_effect = ConnectionRefusedError
114119
115120 Cluster .shutdown (rest_client , force_shutdown )
116121
@@ -121,6 +126,9 @@ def test_cluster_shutdown(self, rest_client):
121126 )
122127
123128 def test_cluster_shutdown_default_force_shutdown (self , rest_client ):
129+ rest_client .create_record .side_effect = ScaleTimeoutError ("Timeout error" )
130+ rest_client .get_record .side_effect = ConnectionRefusedError
131+
124132 Cluster .shutdown (rest_client )
125133
126134 rest_client .create_record .assert_called_with (
You can’t perform that action at this time.
0 commit comments