summaryrefslogtreecommitdiffstats
path: root/src/ceph-daemon/tests
diff options
context:
space:
mode:
authorThomas Bechtold <tbechtold@suse.com>2019-11-07 17:47:02 +0100
committerThomas Bechtold <tbechtold@suse.com>2019-11-08 17:05:57 +0100
commit1109bf9bcd9eb407ba785bff0ffc33d300176db0 (patch)
tree47db09e7d643b4542a8036b07e3b6c2dd918ca13 /src/ceph-daemon/tests
parentceph-daemon: Move ceph-daemon executable to own directory (diff)
downloadceph-1109bf9bcd9eb407ba785bff0ffc33d300176db0.tar.xz
ceph-1109bf9bcd9eb407ba785bff0ffc33d300176db0.zip
ceph-daemon: Add basic unittest infrastructure and cmake integration
To be able to write unittests, add a tox.ini (for testing in venvs) and a first single test case as example. Tests can be executed with eg: $ tox Or by running the usual: $ ./run-make-check.sh Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
Diffstat (limited to 'src/ceph-daemon/tests')
-rw-r--r--src/ceph-daemon/tests/__init__.py0
-rw-r--r--src/ceph-daemon/tests/test_ceph_daemon.py10
2 files changed, 10 insertions, 0 deletions
diff --git a/src/ceph-daemon/tests/__init__.py b/src/ceph-daemon/tests/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/src/ceph-daemon/tests/__init__.py
diff --git a/src/ceph-daemon/tests/test_ceph_daemon.py b/src/ceph-daemon/tests/test_ceph_daemon.py
new file mode 100644
index 00000000000..65f98e47fc8
--- /dev/null
+++ b/src/ceph-daemon/tests/test_ceph_daemon.py
@@ -0,0 +1,10 @@
+import imp
+import unittest
+
+
+cd = imp.load_source("ceph-daemon", "ceph-daemon")
+
+
+class TestCephDaemon(unittest.TestCase):
+ def test_is_fsid(self):
+ self.assertFalse(cd.is_fsid('no-uuid'))