Remove kwargs from the vendor passthru continue_deploy tests
The commit a9216bb07f4ccd4dc202fd1f5c14b36a08ac6046 in Ironic refactored the vendor passtrhru classes and removed the kwargs from the continue_deploy() method, breaking the tests in here. Closes-Bug: #1612210 Change-Id: Ie471dddb7d05a0fd5710518ab38b555e7dce0596
This commit is contained in:
parent
477fd760e3
commit
0eef2eaa95
|
@ -23,8 +23,8 @@ from ironic.drivers.modules import iscsi_deploy
|
|||
class AMTPXEVendorPassthru(iscsi_deploy.VendorPassthru):
|
||||
|
||||
@task_manager.require_exclusive_lock
|
||||
def continue_deploy(self, task, **kwargs):
|
||||
def continue_deploy(self, task):
|
||||
if deploy_utils.get_boot_option(task.node) == "netboot":
|
||||
task.driver.management.ensure_next_boot_device(task.node,
|
||||
boot_devices.PXE)
|
||||
super(AMTPXEVendorPassthru, self).continue_deploy(task, **kwargs)
|
||||
super(AMTPXEVendorPassthru, self).continue_deploy(task)
|
||||
|
|
|
@ -59,7 +59,6 @@ class AMTPXEVendorPassthruTestCase(db_base.DbTestCase):
|
|||
def test_vendorpassthru_continue_deploy_netboot(self,
|
||||
mock_pxe_vendorpassthru,
|
||||
mock_ensure):
|
||||
kwargs = {'address': '123456'}
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=False) as task:
|
||||
task.node.provision_state = states.DEPLOYWAIT
|
||||
|
@ -67,11 +66,11 @@ class AMTPXEVendorPassthruTestCase(db_base.DbTestCase):
|
|||
task.node.instance_info['capabilities'] = {
|
||||
"boot_option": "netboot"
|
||||
}
|
||||
task.driver.vendor.continue_deploy(task, **kwargs)
|
||||
task.driver.vendor.continue_deploy(task)
|
||||
mock_ensure.assert_called_with(
|
||||
task.driver.management, task.node, boot_devices.PXE)
|
||||
mock_pxe_vendorpassthru.assert_called_once_with(
|
||||
task.driver.vendor, task, **kwargs)
|
||||
task.driver.vendor, task)
|
||||
|
||||
@mock.patch.object(amt_mgmt.AMTManagement, 'ensure_next_boot_device',
|
||||
spec_set=True, autospec=True)
|
||||
|
@ -80,13 +79,12 @@ class AMTPXEVendorPassthruTestCase(db_base.DbTestCase):
|
|||
def test_vendorpassthru_continue_deploy_localboot(self,
|
||||
mock_pxe_vendorpassthru,
|
||||
mock_ensure):
|
||||
kwargs = {'address': '123456'}
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=False) as task:
|
||||
task.node.provision_state = states.DEPLOYWAIT
|
||||
task.node.target_provision_state = states.ACTIVE
|
||||
task.node.instance_info['capabilities'] = {"boot_option": "local"}
|
||||
task.driver.vendor.continue_deploy(task, **kwargs)
|
||||
task.driver.vendor.continue_deploy(task,)
|
||||
self.assertFalse(mock_ensure.called)
|
||||
mock_pxe_vendorpassthru.assert_called_once_with(
|
||||
task.driver.vendor, task, **kwargs)
|
||||
task.driver.vendor, task)
|
||||
|
|
Loading…
Reference in New Issue