]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: add unit tests to Rook module 43044/head
authorJoseph Sawaya <jsawaya@redhat.com>
Fri, 3 Sep 2021 14:28:57 +0000 (10:28 -0400)
committerJoseph Sawaya <jsawaya@redhat.com>
Mon, 13 Sep 2021 15:00:09 +0000 (11:00 -0400)
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 <jsawaya@redhat.com>
src/pybind/mgr/rook/__init__.py
src/pybind/mgr/rook/tests/__init__.py [new file with mode: 0644]
src/pybind/mgr/tox.ini

index b9f08fc8007eeda3fe50fb781d36823997f9c043..b16bddb73e7ab3b822c26dd512e63a54cca15b58 100644 (file)
@@ -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 (file)
index 0000000..e69de29
index 5fb8a18107998329e851f05965859ace17a5bc49..0811cf8964f0a995d2b625449eb96b0beb53bc24 100644 (file)
@@ -42,6 +42,7 @@ setenv =
 deps =
     cython
     -rrequirements.txt
+    -rrook/requirements.txt
 commands =
     pytest --doctest-modules {posargs:}