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
This commit is contained in:
parent
e8dcb40921
commit
e28b0b229d
@ -40,6 +40,7 @@ from ironic_inspector import db
|
|||||||
from ironic_inspector import dbsync
|
from ironic_inspector import dbsync
|
||||||
from ironic_inspector import introspection_state as istate
|
from ironic_inspector import introspection_state as istate
|
||||||
from ironic_inspector import main
|
from ironic_inspector import main
|
||||||
|
from ironic_inspector import node_cache
|
||||||
from ironic_inspector import rules
|
from ironic_inspector import rules
|
||||||
from ironic_inspector.test import base
|
from ironic_inspector.test import base
|
||||||
|
|
||||||
@ -133,6 +134,10 @@ class Base(base.NodeTest):
|
|||||||
conf_file = get_test_conf_file()
|
conf_file = get_test_conf_file()
|
||||||
self.cfg.set_config_files([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,
|
def call(self, method, endpoint, data=None, expect_error=None,
|
||||||
api_version=None):
|
api_version=None):
|
||||||
if data is not None:
|
if data is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user