aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functest/tests/unit/cli/commands/test_cli_env.py1
-rw-r--r--functest/tests/unit/core/test_testcase_base.py1
-rw-r--r--functest/tests/unit/odl/test_odl.py1
-rw-r--r--functest/tests/unit/utils/test_functest_utils.py1
-rwxr-xr-xrun_unit_tests.sh3
5 files changed, 4 insertions, 3 deletions
diff --git a/functest/tests/unit/cli/commands/test_cli_env.py b/functest/tests/unit/cli/commands/test_cli_env.py
index 4b6ea57a..f70761dc 100644
--- a/functest/tests/unit/cli/commands/test_cli_env.py
+++ b/functest/tests/unit/cli/commands/test_cli_env.py
@@ -11,6 +11,7 @@ import unittest
from git.exc import NoSuchPathError
import mock
+mock.patch('logging.FileHandler').start() # noqa
from functest.cli.commands import cli_env
from functest.utils.constants import CONST
from functest.tests.unit import test_utils
diff --git a/functest/tests/unit/core/test_testcase_base.py b/functest/tests/unit/core/test_testcase_base.py
index b7c81d87..b6efa40d 100644
--- a/functest/tests/unit/core/test_testcase_base.py
+++ b/functest/tests/unit/core/test_testcase_base.py
@@ -11,6 +11,7 @@ import logging
import mock
import unittest
+mock.patch('logging.FileHandler').start() # noqa
from functest.core import testcase_base
diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py
index d8c7f84e..4430c3b8 100644
--- a/functest/tests/unit/odl/test_odl.py
+++ b/functest/tests/unit/odl/test_odl.py
@@ -17,6 +17,7 @@ from keystoneauth1.exceptions import auth_plugins
from robot.errors import RobotError
from robot.result import testcase
+mock.patch('logging.FileHandler').start() # noqa
from functest.core import testcase_base
from functest.opnfv_tests.sdn.odl import odl
diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py
index ce9086a7..c4b56660 100644
--- a/functest/tests/unit/utils/test_functest_utils.py
+++ b/functest/tests/unit/utils/test_functest_utils.py
@@ -18,6 +18,7 @@ import mock
import requests
from functest.tests.unit import test_utils
+mock.patch('logging.FileHandler').start() # noqa
from functest.utils import functest_utils
diff --git a/run_unit_tests.sh b/run_unit_tests.sh
index e0e6195c..edce03c1 100755
--- a/run_unit_tests.sh
+++ b/run_unit_tests.sh
@@ -21,10 +21,7 @@ clean_results_dir
# TODO clean that...
# Create log dir if needed
# log shall be disabled during unit tests
-# fix to be done in Logger
-echo "Create dummy log file...."
sudo mkdir -p /home/opnfv/functest/results/odl
-sudo touch /home/opnfv/functest/results/functest.log
sudo touch /home/opnfv/functest/results/odl/stdout.txt
sudo chmod -Rf a+rw /home/opnfv