summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-08-03 11:26:23 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-08-03 11:26:23 +0800
commit9be3d97be191f22cb55a47107f325bada5923fae (patch)
tree88b8d28a78b51adf05077a39c025c3cf682f6360
parent6f1862e62b5a3479eabca1de448c6c2f0947e5a1 (diff)
Fix log directory problem when exec UT
Change log directory when exec UT Change-Id: If4b2304354172b8668ceb748b158d0b2440f2738 Issue-ID: VFC-1010 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/lcm/settings.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lcm/lcm/settings.py b/lcm/lcm/settings.py
index edba0e3d..894b9691 100644
--- a/lcm/lcm/settings.py
+++ b/lcm/lcm/settings.py
@@ -155,10 +155,14 @@ STATIC_URL = '/static/'
LOGGING_CONFIG = None
# yaml configuration of logging
LOGGING_FILE = os.path.join(BASE_DIR, 'lcm/log.yml')
+if 'test' in sys.argv:
+ os.system('sed -i "s|/var/log/onap/vfc/gvnfm-vnflcm|/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-vnflcm|" %s' % LOGGING_FILE)
+
from lcm.pub.config import config
config.REG_TO_MSB_WHEN_START = False