]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: Remove insights/tox.ini 34738/head
authorSebastian Wagner <sebastian.wagner@suse.com>
Fri, 24 Apr 2020 13:52:07 +0000 (15:52 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Wed, 29 Apr 2020 11:02:37 +0000 (13:02 +0200)
All we need is part of mgr/tox.ini nowadays.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/CMakeLists.txt
src/pybind/mgr/insights/CMakeLists.txt [deleted file]
src/pybind/mgr/insights/__init__.py
src/pybind/mgr/insights/tests/test_health.py
src/pybind/mgr/insights/tox.ini [deleted file]
src/pybind/mgr/tox.ini

index 8c544eb41800e90925eaef8d9b58e86b73a2496f..834e9d2099c83e16e7bba3feb0f35af31b2f0757 100644 (file)
@@ -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 (file)
index f105a7b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-if(WITH_TESTS)
-  include(AddCephTest)
-  add_tox_test(mgr-insights)
-endif()
index ea61a12fd7eaf800f2feaa9fef155cfe9a0aa770..99e8063285815e4370f98fad426d733c7f3200b5 100644 (file)
@@ -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
index 9b34786dcc0687634aeb8b790fedb3a55d8d06ea..c39e1097d4637ccfb1e9ba2a9c903ea9ddd0e990 100644 (file)
@@ -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 (file)
index 9c74a8d..0000000
+++ /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/
index e6a902a74763fe11765ae46adf6312dd767472b3..cd090435a6c02380a6e290e2ee3e600dfd2e3da9 100644 (file)
@@ -17,6 +17,7 @@ commands =
         tests/ \
         cephadm/ \
         orchestrator/ \
+        insights/ \
         pg_autoscaler/ \
         progress/}