mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
83ff83157c
Fixes: https://tracker.ceph.com/issues/46233 Signed-off-by: Ricardo Marques <rimarques@suse.com>
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
import logging
|
|
|
|
from tasks.mgr.mgr_test_case import MgrTestCase
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
class TestCephadmCLI(MgrTestCase):
|
|
def _cmd(self, *args):
|
|
return self.mgr_cluster.mon_manager.raw_cluster_cmd(*args)
|
|
|
|
def _orch_cmd(self, *args):
|
|
return self._cmd("orch", *args)
|
|
|
|
def setUp(self):
|
|
super(TestCephadmCLI, self).setUp()
|
|
|
|
def test_yaml(self):
|
|
"""
|
|
to prevent oddities like
|
|
|
|
>>> import yaml
|
|
... from collections import OrderedDict
|
|
... assert yaml.dump(OrderedDict()) == '!!python/object/apply:collections.OrderedDict\\n- []\\n'
|
|
"""
|
|
out = self._orch_cmd('device', 'ls', '--format', 'yaml')
|
|
self.assertNotIn('!!python', out)
|
|
|
|
out = self._orch_cmd('host', 'ls', '--format', 'yaml')
|
|
self.assertNotIn('!!python', out)
|
|
|
|
out = self._orch_cmd('ls', '--format', 'yaml')
|
|
self.assertNotIn('!!python', out)
|
|
|
|
out = self._orch_cmd('ps', '--format', 'yaml')
|
|
self.assertNotIn('!!python', out)
|
|
|
|
out = self._orch_cmd('status', '--format', 'yaml')
|
|
self.assertNotIn('!!python', out)
|