diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-08-03 11:38:36 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-08-03 11:38:36 +0800 |
commit | cfdeac0921abe1dddc5f146799fd3cea3ae4cce8 (patch) | |
tree | 481dae1bbbf0880afed6f5b1f50c691f93ca3e24 | |
parent | 4729c8fc535f2efc79ba02542893beeb86dbcfca (diff) |
Fix log directory problem when exec UT
Change log directory when exec UT
Change-Id: I0b6d5c7d80e236efe192d263e535d1a22fc4f3e8
Issue-ID: VFC-1010
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | mgr/mgr/settings.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mgr/mgr/settings.py b/mgr/mgr/settings.py index ddedd75..5aebbae 100644 --- a/mgr/mgr/settings.py +++ b/mgr/mgr/settings.py @@ -156,10 +156,14 @@ STATIC_URL = '/static/' LOGGING_CONFIG = None # yaml configuration of logging LOGGING_FILE = os.path.join(BASE_DIR, 'mgr/log.yml') +if 'test' in sys.argv: + os.system('sed -i "s|/var/log/onap/vfc/gvnfm-vnfmgr|/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/gvnfm-vnfmgr|" %s' % LOGGING_FILE) + from mgr.pub.config import config config.REG_TO_MSB_WHEN_START = False DATABASES = {} |