ceph/qa/tasks/mgr/test_cephadm_orchestrator.py
Thomas Bechtold 0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00

24 lines
707 B
Python

import logging
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("cephadm")
self._orch_cmd("set", "backend", "cephadm")
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)