Merge "Add baro_tests as requirements"
authorvalentin boucher <valentin.boucher@orange.com>
Mon, 22 May 2017 13:09:00 +0000 (13:09 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 22 May 2017 13:09:00 +0000 (13:09 +0000)
docker/Dockerfile
functest/tests/unit/features/test_barometer.py
requirements.txt

index 4a570b5..ef5967f 100644 (file)
@@ -89,7 +89,6 @@ RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/doctor ${REPO
 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/promise ${REPOS_DIR}/promise
 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/netready ${REPOS_DIR}/netready
 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/fds ${REPOS_DIR}/fds
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/barometer ${REPOS_DIR}/barometer
 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/sfc ${REPOS_DIR}/sfc
 RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/snaps ${REPOS_DIR}/snaps
 RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/securityscanning ${REPOS_DIR}/securityscanning
@@ -115,9 +114,6 @@ RUN cd ${FUNCTEST_REPO_DIR} \
     && pip install -r requirements.txt \
     && pip install -e .
 
-RUN cd ${REPOS_DIR}/barometer \
-    && pip install .
-
 RUN pip install ${REPOS_DIR}/opera
 
 RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
index c651261..8c2585d 100644 (file)
@@ -16,9 +16,8 @@ import unittest
 import mock
 
 from functest.core import testcase
-sys.modules['baro_tests'] = mock.Mock()  # noqa
-# pylint: disable=wrong-import-position
-from functest.opnfv_tests.features import barometer
+with mock.patch('functest.utils.functest_utils.get_parameter_from_yaml'):
+    from functest.opnfv_tests.features import barometer
 
 
 class BarometerTesting(unittest.TestCase):
index 7b8af65..425d4a6 100644 (file)
@@ -38,3 +38,4 @@ iniparse==0.4
 PrettyTable>=0.7.1,<0.8 # BSD
 six>=1.9.0 # MIT
 git+https://gerrit.opnfv.org/gerrit/releng#egg=opnfv&subdirectory=modules
+git+https://gerrit.opnfv.org/gerrit/barometer#egg=baro_tests