Merge "Log copy for failed functional tests cannot be disabled"
This commit is contained in:
commit
075dc665a5
@ -160,6 +160,10 @@ class BaseMagnumTest(base.BaseTestCase):
|
|||||||
creds = cls.get_credentials(name, type_of_creds, class_cleanup)
|
creds = cls.get_credentials(name, type_of_creds, class_cleanup)
|
||||||
return cls.get_clients(creds, type_of_creds, request_type)
|
return cls.get_clients(creds, type_of_creds, request_type)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_copy_logs(cls):
|
||||||
|
return config.Config.copy_logs
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def copy_logs_handler(cls, get_nodes_fn, coe, keypair):
|
def copy_logs_handler(cls, get_nodes_fn, coe, keypair):
|
||||||
"""Copy logs closure.
|
"""Copy logs closure.
|
||||||
@ -172,8 +176,8 @@ class BaseMagnumTest(base.BaseTestCase):
|
|||||||
:param coe: the COE type of the nodes
|
:param coe: the COE type of the nodes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not config.Config.copy_logs:
|
if not cls.get_copy_logs():
|
||||||
return lambda: None
|
return lambda exec_info: None
|
||||||
|
|
||||||
def int_copy_logs(exec_info):
|
def int_copy_logs(exec_info):
|
||||||
try:
|
try:
|
||||||
|
@ -113,7 +113,7 @@ class Config(object):
|
|||||||
def set_copy_logs(cls, config):
|
def set_copy_logs(cls, config):
|
||||||
if 'copy_logs' not in CONF.magnum:
|
if 'copy_logs' not in CONF.magnum:
|
||||||
cls.copy_logs = True
|
cls.copy_logs = True
|
||||||
cls.copy_logs = CONF.magnum.copy_logs
|
cls.copy_logs = str(CONF.magnum.copy_logs).lower() == 'true'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUp(cls):
|
def setUp(cls):
|
||||||
|
Loading…
Reference in New Issue
Block a user