From 5d734210797663e86f9f91aeaab5f28184bcd01c Mon Sep 17 00:00:00 2001 From: Joseph Sawaya Date: Fri, 3 Sep 2021 10:28:57 -0400 Subject: [PATCH] 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 --- src/pybind/mgr/rook/__init__.py | 3 +++ src/pybind/mgr/rook/tests/__init__.py | 0 src/pybind/mgr/tox.ini | 1 + 3 files changed, 4 insertions(+) create mode 100644 src/pybind/mgr/rook/tests/__init__.py 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:} -- 2.39.5