From: Travis Rhoden Date: Wed, 24 Jun 2015 22:38:52 +0000 (-0700) Subject: [RM-11742] Remove duplicate tests from test_cli_mon X-Git-Tag: v1.5.26~14^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb090ac79acda356e3912a0f06f1da6d6d3c9904;p=ceph-deploy.git [RM-11742] Remove duplicate tests from test_cli_mon Signed-off-by: Travis Rhoden --- diff --git a/ceph_deploy/tests/test_cli_mon.py b/ceph_deploy/tests/test_cli_mon.py index c952bd2..f90cf8d 100644 --- a/ceph_deploy/tests/test_cli_mon.py +++ b/ceph_deploy/tests/test_cli_mon.py @@ -9,17 +9,7 @@ from ceph_deploy.cli import _main as main from ceph_deploy.tests.directory import directory -def test_help(tmpdir, cli): - with cli( - args=['ceph-deploy', 'mon', '--help'], - stdout=subprocess.PIPE, - ) as p: - result = p.stdout.read() - assert 'usage: ceph-deploy' in result - assert 'positional arguments:' in result - assert 'optional arguments:' in result - - +#TODO: This test does check that things fail if the .conf file is missing def test_bad_no_conf(tmpdir, cli): with pytest.raises(cli.Failed) as err: with cli( @@ -32,20 +22,6 @@ def test_bad_no_conf(tmpdir, cli): assert err.value.status == 2 -def test_bad_no_mon(tmpdir, cli): - with tmpdir.join('ceph.conf').open('w'): - pass - with pytest.raises(cli.Failed) as err: - with cli( - args=['ceph-deploy', 'mon'], - stderr=subprocess.PIPE, - ) as p: - result = p.stderr.read() - assert 'usage: ceph-deploy mon' in result - assert 'too few arguments' in result - assert err.value.status == 2 - - def make_fake_connection(platform_information=None): get_connection = Mock() get_connection.return_value = get_connection