From: Joseph Sawaya Date: Fri, 3 Sep 2021 14:28:57 +0000 (-0400) Subject: mgr/rook: add unit tests to Rook module X-Git-Tag: v17.1.0~869^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5d734210797663e86f9f91aeaab5f28184bcd01c;p=ceph-ci.git mgr/rook: add unit tests to Rook module This commit creates a unit test folder for rook, configurates tox and creates a unit test to test the translation of placement specs to node selectors and vice versa. Signed-off-by: Joseph Sawaya --- diff --git a/src/pybind/mgr/rook/__init__.py b/src/pybind/mgr/rook/__init__.py index b9f08fc8007..b16bddb73e7 100644 --- a/src/pybind/mgr/rook/__init__.py +++ b/src/pybind/mgr/rook/__init__.py @@ -1,2 +1,5 @@ +import os +if 'UNITTEST' in os.environ: + import tests from .module import RookOrchestrator diff --git a/src/pybind/mgr/rook/tests/__init__.py b/src/pybind/mgr/rook/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index 5fb8a181079..0811cf8964f 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -42,6 +42,7 @@ setenv = deps = cython -rrequirements.txt + -rrook/requirements.txt commands = pytest --doctest-modules {posargs:}