Merge "Delete the CUSTOM_RAID template after test has finished"
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
index a66d7d6..4a30aa5 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
@@ -791,8 +791,12 @@
"args": {"raid_config": config},
}
]
- self.baremetal_client.create_deploy_template(
+ _, template = self.baremetal_client.create_deploy_template(
'CUSTOM_RAID', steps=steps)
+ # Set a cleanup to ensure the deploy template is removed.
+ self.addCleanup(
+ self.baremetal_client.delete_deploy_template,
+ template['uuid'])
self.baremetal_client.add_node_trait(self.node['uuid'],
'CUSTOM_RAID')