From: Noah Watkins Date: Fri, 15 Feb 2019 17:45:30 +0000 (-0800) Subject: mgr/orch/ssh: add qa test X-Git-Tag: v14.1.0~37^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26262%2Fhead;p=ceph.git mgr/orch/ssh: add qa test Signed-off-by: Noah Watkins --- diff --git a/qa/suites/rados/mgr/tasks/ssh_orchestrator.yaml b/qa/suites/rados/mgr/tasks/ssh_orchestrator.yaml new file mode 100644 index 000000000000..cd606f76094c --- /dev/null +++ b/qa/suites/rados/mgr/tasks/ssh_orchestrator.yaml @@ -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 index 000000000000..76a31dd332c6 --- /dev/null +++ b/qa/tasks/mgr/test_ssh_orchestrator.py @@ -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)