aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-06-13 11:26:52 +0800
committerCédric Ollivier <cedric.ollivier@orange.com>2017-06-20 16:02:51 +0200
commit739a151179af2fd69c8bca107f917811a4a3f6b4 (patch)
tree38c3ed716905ca30c863ee987b012d34e0f25da8 /functest/tests
parent997a42438f2253aa9fe640c1cbdd8ea461901948 (diff)
Change barometer module to load
As [1] is merged, the way to call the barometer test case is different as it is hosted in Barometer repo instead of Functest. The former files are also simply removed too. baro-tests is no longer a requirement. It is installed as any third party project. [1] https://gerrit.opnfv.org/gerrit/#/c/35927/ Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Iea56b48fa781600eb3a6ac74662ea8a29f556f99 Signed-off-by: Jose Lausuch <jose.lausuch@ericsson.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/features/__init__.py0
-rw-r--r--functest/tests/unit/features/test_barometer.py48
2 files changed, 0 insertions, 48 deletions
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)