diff options
-rw-r--r-- | functest/tests/unit/cli/commands/test_cli_env.py | 1 | ||||
-rw-r--r-- | functest/tests/unit/core/test_testcase_base.py | 1 | ||||
-rw-r--r-- | functest/tests/unit/odl/test_odl.py | 1 | ||||
-rw-r--r-- | functest/tests/unit/utils/test_functest_utils.py | 1 | ||||
-rwxr-xr-x | run_unit_tests.sh | 3 |
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 4b6ea57a7..f70761dcd 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 b7c81d87c..b6efa40dc 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 d8c7f84ec..4430c3b84 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 ce9086a7a..c4b566608 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 e0e6195cb..edce03c16 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 |