From 07fbdc1f297538e9439bd14e46fa372a6be1200c Mon Sep 17 00:00:00 2001 From: fujinhua Date: Fri, 3 Aug 2018 11:50:44 +0800 Subject: Fix log directory problem when exec UT Change log directory when exec UT Change-Id: Iac0fff60eda7429869f69cd48a82f85979580c3d Issue-ID: VFC-1010 Signed-off-by: fujinhua --- zte/vmanager/driver/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zte/vmanager/driver/settings.py b/zte/vmanager/driver/settings.py index e708020c..4f7e21c8 100644 --- a/zte/vmanager/driver/settings.py +++ b/zte/vmanager/driver/settings.py @@ -147,10 +147,14 @@ STATIC_URL = '/static/' LOGGING_CONFIG = None # yaml configuration of logging LOGGING_FILE = os.path.join(BASE_DIR, 'driver/log.yml') +if 'test' in sys.argv: + os.system('sed -i "s|/var/log/onap/vfc/ztevnfmdriver|/tmp|" %s' % LOGGING_FILE) config.yamlConfig(filepath=LOGGING_FILE, watchDog=True) if 'test' in sys.argv: + os.system('sed -i "s|/tmp|/var/log/onap/vfc/ztevnfmdriver|" %s' % LOGGING_FILE) + from driver.pub.config import config config.REG_TO_MSB_WHEN_START = False REST_FRAMEWORK = {} -- cgit 1.2.3-korg