]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orch/ssh: add qa test 26262/head
authorNoah Watkins <noahwatkins@gmail.com>
Fri, 15 Feb 2019 17:45:30 +0000 (09:45 -0800)
committerNoah Watkins <noahwatkins@gmail.com>
Wed, 20 Feb 2019 17:45:48 +0000 (09:45 -0800)
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
qa/suites/rados/mgr/tasks/ssh_orchestrator.yaml [new file with mode: 0644]
qa/tasks/mgr/test_ssh_orchestrator.py [new file with mode: 0644]

diff --git a/qa/suites/rados/mgr/tasks/ssh_orchestrator.yaml b/qa/suites/rados/mgr/tasks/ssh_orchestrator.yaml
new file mode 100644 (file)
index 0000000..cd606f7
--- /dev/null
@@ -0,0 +1,18 @@
+
+tasks:
+  - install:
+  - ceph:
+      # tests may leave mgrs broken, so don't try and call into them
+      # to invoke e.g. pg dump during teardown.
+      wait-for-scrub: false
+      log-whitelist:
+        - overall HEALTH_
+        - \(MGR_DOWN\)
+        - \(MGR_INSIGHTS_WARNING\)
+        - \(insights_health_check
+        - \(PG_
+        - replacing it with standby
+        - No standby daemons available
+  - cephfs_test_runner:
+      modules:
+        - tasks.mgr.test_ssh_orchestrator
diff --git a/qa/tasks/mgr/test_ssh_orchestrator.py b/qa/tasks/mgr/test_ssh_orchestrator.py
new file mode 100644 (file)
index 0000000..76a31dd
--- /dev/null
@@ -0,0 +1,26 @@
+import json
+import logging
+from tempfile import NamedTemporaryFile
+from teuthology.exceptions import CommandFailedError
+from mgr_test_case import MgrTestCase
+
+log = logging.getLogger(__name__)
+
+class TestOrchestratorCli(MgrTestCase):
+    MGRS_REQUIRED = 1
+
+    def _orch_cmd(self, *args):
+        return self.mgr_cluster.mon_manager.raw_cluster_cmd("orchestrator", *args)
+
+    def setUp(self):
+        super(TestOrchestratorCli, self).setUp()
+        self._load_module("orchestrator_cli")
+        self._load_module("ssh")
+        self._orch_cmd("set", "backend", "ssh")
+
+    def test_host_ls(self):
+        self._orch_cmd("host", "add", "osd0")
+        self._orch_cmd("host", "add", "mon0")
+        ret = self._orch_cmd("host", "ls")
+        self.assertIn("osd0", ret)
+        self.assertIn("mon0", ret)