From: Sebastian Wagner Date: Fri, 24 Apr 2020 13:52:07 +0000 (+0200) Subject: pybind/mgr: Remove insights/tox.ini X-Git-Tag: v16.1.0~2457^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F34738%2Fhead;p=ceph.git pybind/mgr: Remove insights/tox.ini All we need is part of mgr/tox.ini nowadays. Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/CMakeLists.txt b/src/pybind/mgr/CMakeLists.txt index 8c544eb41800..834e9d2099c8 100644 --- a/src/pybind/mgr/CMakeLists.txt +++ b/src/pybind/mgr/CMakeLists.txt @@ -1,7 +1,6 @@ if(WITH_MGR_DASHBOARD_FRONTEND) add_subdirectory(dashboard) endif() -add_subdirectory(insights) if(WITH_MGR_ROOK_CLIENT) add_subdirectory(rook) endif() diff --git a/src/pybind/mgr/insights/CMakeLists.txt b/src/pybind/mgr/insights/CMakeLists.txt deleted file mode 100644 index f105a7bc9ea6..000000000000 --- a/src/pybind/mgr/insights/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -if(WITH_TESTS) - include(AddCephTest) - add_tox_test(mgr-insights) -endif() diff --git a/src/pybind/mgr/insights/__init__.py b/src/pybind/mgr/insights/__init__.py index ea61a12fd7ea..99e806328581 100644 --- a/src/pybind/mgr/insights/__init__.py +++ b/src/pybind/mgr/insights/__init__.py @@ -1,9 +1,6 @@ -from __future__ import absolute_import import os -if 'UNITTEST' not in os.environ: - from .module import Module -else: - import sys - import mock - sys.modules['ceph_module'] = mock.Mock() +if 'UNITTEST' in os.environ: + import tests + +from .module import Module diff --git a/src/pybind/mgr/insights/tests/test_health.py b/src/pybind/mgr/insights/tests/test_health.py index 9b34786dcc06..c39e1097d463 100644 --- a/src/pybind/mgr/insights/tests/test_health.py +++ b/src/pybind/mgr/insights/tests/test_health.py @@ -1,5 +1,5 @@ import unittest -import mock +from tests import mock from ..health import * class HealthChecksTest(unittest.TestCase): diff --git a/src/pybind/mgr/insights/tox.ini b/src/pybind/mgr/insights/tox.ini deleted file mode 100644 index 9c74a8df0a0e..000000000000 --- a/src/pybind/mgr/insights/tox.ini +++ /dev/null @@ -1,15 +0,0 @@ -[tox] -envlist = py3 -skipsdist = true -toxworkdir = {env:CEPH_BUILD_DIR}/insights -minversion = 2.8.1 - -[testenv] -deps = - pytest - mock -setenv= - UNITTEST = true - py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3 -commands= - {envbindir}/py.test tests/ diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index e6a902a74763..cd090435a6c0 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -17,6 +17,7 @@ commands = tests/ \ cephadm/ \ orchestrator/ \ + insights/ \ pg_autoscaler/ \ progress/}