Undo maintenace state on protected node tests

As part of the protected from deletion test, we set a node into maintenance
state which allows override actions to be performed for node deletions.

The test is verifying the removal of the node is prevented. This fails upon
the TearDown class execution, resulting in a silent hidden failure which
cannot complete teardown because you cannot unprovision, as is in the
teardown step, a node in maintenance state.

Explicitly unset maintenance, and the world will be happy!

Change-Id: I89839ecb0e08555ddcfee0289350fac1923b3958
This commit is contained in:
Julia Kreger 2022-07-13 13:07:44 -07:00
parent c4a2e5e139
commit 8d176bd321

View File

@ -915,6 +915,9 @@ class TestNodeProtected(base.BaseBaremetalTest):
self.assertRaises(lib_exc.Forbidden,
self.client.delete_node,
self.node['uuid'])
# undo maintenance because we can't teardown something
# in maintenance.
self.client.update_node(self.node['uuid'], maintenance=False)
@decorators.attr(type='negative')
@decorators.idempotent_id('1c819f4c-6c1d-4150-ba4a-3b0dcb3c8694')