From e28b0b229d8ceca57fabd392a1e71279342a38aa Mon Sep 17 00:00:00 2001 From: dparalen Date: Mon, 16 Jan 2017 15:51:36 +0100 Subject: [PATCH] Functional test node remove The functional tests create nodes but never remove them. This patch introduces a Base.tearDown() method to remove nodes created during the testcase setup. Change-Id: I480d89512f265e1b459a009e464077b3771f0a66 --- ironic_inspector/test/functional.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ironic_inspector/test/functional.py b/ironic_inspector/test/functional.py index 67a60f054..d285a2fa8 100644 --- a/ironic_inspector/test/functional.py +++ b/ironic_inspector/test/functional.py @@ -40,6 +40,7 @@ from ironic_inspector import db from ironic_inspector import dbsync from ironic_inspector import introspection_state as istate from ironic_inspector import main +from ironic_inspector import node_cache from ironic_inspector import rules from ironic_inspector.test import base @@ -133,6 +134,10 @@ class Base(base.NodeTest): conf_file = get_test_conf_file() self.cfg.set_config_files([conf_file]) + def tearDown(self): + super(Base, self).tearDown() + node_cache._delete_node(self.uuid) + def call(self, method, endpoint, data=None, expect_error=None, api_version=None): if data is not None: