diff options
-rw-r--r-- | docker/Dockerfile | 5 | ||||
-rw-r--r-- | docker/Dockerfile.aarch64 | 5 | ||||
-rw-r--r-- | docker/thirdparty-requirements.txt | 1 | ||||
-rw-r--r-- | functest/ci/testcases.yaml | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/features/__init__.py | 0 | ||||
-rw-r--r-- | functest/opnfv_tests/features/barometer.py | 24 | ||||
-rw-r--r-- | functest/tests/unit/features/__init__.py | 0 | ||||
-rw-r--r-- | functest/tests/unit/features/test_barometer.py | 48 | ||||
-rw-r--r-- | requirements.txt | 1 | ||||
-rw-r--r-- | tox.ini | 1 |
10 files changed, 8 insertions, 79 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index d18c6c97d..80864ed9c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -79,11 +79,12 @@ RUN mkdir -p ${FUNCTEST_REPO_DIR} \ RUN git config --global http.sslVerify false +COPY thirdparty-requirements.txt thirdparty-requirements.txt RUN pip install \ git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \ git+https://gerrit.opnfv.org/gerrit/releng@$BRANCH#egg=opnfv\&subdirectory=modules \ - git+https://gerrit.opnfv.org/gerrit/barometer@$BRANCH#egg=baro_tests \ - git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps + git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps \ + -r thirdparty-requirements.txt # Hook required by hardcoded paths in Functest RUN ln -s /usr/local/lib/python2.7/dist-packages/functest ${FUNCTEST_REPO_DIR}/functest diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64 index eea475a8f..4fbfeac44 100644 --- a/docker/Dockerfile.aarch64 +++ b/docker/Dockerfile.aarch64 @@ -78,11 +78,12 @@ RUN mkdir -p ${FUNCTEST_REPO_DIR} \ RUN git config --global http.sslVerify false +COPY thirdparty-requirements.txt thirdparty-requirements.txt RUN pip install \ git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest \ git+https://gerrit.opnfv.org/gerrit/releng@$BRANCH#egg=opnfv\&subdirectory=modules \ - git+https://gerrit.opnfv.org/gerrit/barometer@$BRANCH#egg=baro_tests \ - git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps + git+https://gerrit.opnfv.org/gerrit/snaps@$BRANCH#egg=snaps \ + -r thirdparty-requirements.txt # Hook required by hardcoded paths in Functest RUN ln -s /usr/local/lib/python2.7/dist-packages/functest ${FUNCTEST_REPO_DIR}/functest diff --git a/docker/thirdparty-requirements.txt b/docker/thirdparty-requirements.txt new file mode 100644 index 000000000..51d21f2df --- /dev/null +++ b/docker/thirdparty-requirements.txt @@ -0,0 +1 @@ +git+https://gerrit.opnfv.org/gerrit/barometer#egg=baro_tests diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index 7d518324e..c30292bc7 100644 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -447,7 +447,7 @@ tiers: installer: 'fuel' scenario: 'kvm_ovs_dpdk_bar' run: - module: 'functest.opnfv_tests.features.barometer' + module: 'baro_tests.barometer' class: 'BarometerCollectd' - diff --git a/functest/opnfv_tests/features/__init__.py b/functest/opnfv_tests/features/__init__.py deleted file mode 100644 index e69de29bb..000000000 --- a/functest/opnfv_tests/features/__init__.py +++ /dev/null diff --git a/functest/opnfv_tests/features/barometer.py b/functest/opnfv_tests/features/barometer.py deleted file mode 100644 index e210f333c..000000000 --- a/functest/opnfv_tests/features/barometer.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 - -import logging - -from baro_tests import collectd - -import functest.core.feature as base - - -class BarometerCollectd(base.Feature): - ''' - Class for executing barometercollectd testcase. - ''' - - __logger = logging.getLogger(__name__) - - def execute(self): - return collectd.main(self.__logger) diff --git a/functest/tests/unit/features/__init__.py b/functest/tests/unit/features/__init__.py deleted file mode 100644 index e69de29bb..000000000 --- a/functest/tests/unit/features/__init__.py +++ /dev/null diff --git a/functest/tests/unit/features/test_barometer.py b/functest/tests/unit/features/test_barometer.py deleted file mode 100644 index 8c2585d9c..000000000 --- a/functest/tests/unit/features/test_barometer.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2017 Orange and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 - -# pylint: disable=missing-docstring - -import logging -import sys -import unittest - -import mock - -from functest.core import testcase -with mock.patch('functest.utils.functest_utils.get_parameter_from_yaml'): - from functest.opnfv_tests.features import barometer - - -class BarometerTesting(unittest.TestCase): - - _case_name = "barometercollectd" - _project_name = "barometer" - - def setUp(self): - self.barometer = barometer.BarometerCollectd( - case_name=self._case_name, project_name=self._project_name) - - def test_init(self): - self.assertEqual(self.barometer.project_name, self._project_name) - self.assertEqual(self.barometer.case_name, self._case_name) - - def test_run_ko(self): - sys.modules['baro_tests'].collectd.main = mock.Mock(return_value=1) - self.assertEqual(self.barometer.run(), - testcase.TestCase.EX_RUN_ERROR) - - def test_run(self): - sys.modules['baro_tests'].collectd.main = mock.Mock(return_value=0) - self.assertEqual(self.barometer.run(), testcase.TestCase.EX_OK) - - -if __name__ == "__main__": - logging.disable(logging.CRITICAL) - unittest.main(verbosity=2) diff --git a/requirements.txt b/requirements.txt index 10d83e18e..6384f967e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,5 +26,4 @@ iniparse==0.4 PrettyTable<0.8,>=0.7.1 # BSD six>=1.9.0 # MIT opnfv -baro-tests snaps @@ -7,7 +7,6 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt git+https://gerrit.opnfv.org/gerrit/releng#egg=opnfv&subdirectory=modules - git+https://gerrit.opnfv.org/gerrit/barometer#egg=baro_tests git+https://gerrit.opnfv.org/gerrit/snaps#egg=snaps commands = nosetests --with-xunit \ --with-coverage \ |