summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/drivers/modules
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-02-20 15:27:21 +0000
committerGerrit Code Review <review@openstack.org>2023-02-20 15:27:21 +0000
commit3707422bf70af2926744f669b6447da8f2ec2d67 (patch)
treefa52f2d756ab72eb2a8f7fc1fa75b914949ca5a5 /ironic/tests/unit/drivers/modules
parentc130d063b69901193df5c0f023250ce2f4d822a6 (diff)
parentc9c9b3100d3bd8983ca53a75c4a4e5f9c7f122b9 (diff)
downloadironic-3707422bf70af2926744f669b6447da8f2ec2d67.tar.gz
Merge "Fixes console port conflict occurs in certain path"
Diffstat (limited to 'ironic/tests/unit/drivers/modules')
-rw-r--r--ironic/tests/unit/drivers/modules/test_ipmitool.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ironic/tests/unit/drivers/modules/test_ipmitool.py b/ironic/tests/unit/drivers/modules/test_ipmitool.py
index b982e0cb2..016b9d6ed 100644
--- a/ironic/tests/unit/drivers/modules/test_ipmitool.py
+++ b/ironic/tests/unit/drivers/modules/test_ipmitool.py
@@ -3255,6 +3255,11 @@ class IPMIToolShellinaboxTestCase(db_base.DbTestCase):
mock_start.return_value = None
mock_info.return_value = {'port': None}
mock_alloc.return_value = 1234
+ # Ensure allocated port is not re-used
+ dii = self.node.driver_internal_info
+ dii['allocated_ipmi_terminal_port'] = 4321
+ self.node.driver_internal_info = dii
+ self.node.save()
with task_manager.acquire(self.context,
self.node.uuid) as task:
@@ -3468,6 +3473,11 @@ class IPMIToolSocatDriverTestCase(IPMIToolShellinaboxTestCase):
mock_start.return_value = None
mock_info.return_value = {'port': None}
mock_alloc.return_value = 1234
+ # Ensure allocated port is not re-used
+ dii = self.node.driver_internal_info
+ dii['allocated_ipmi_terminal_port'] = 4321
+ self.node.driver_internal_info = dii
+ self.node.save()
with task_manager.acquire(self.context,
self.node.uuid) as task: