]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-11742] Remove more duplicate tests 311/head
authorTravis Rhoden <trhoden@redhat.com>
Fri, 26 Jun 2015 00:06:22 +0000 (17:06 -0700)
committerTravis Rhoden <trhoden@redhat.com>
Fri, 26 Jun 2015 00:06:22 +0000 (17:06 -0700)
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
ceph_deploy/tests/test_cli_admin.py
ceph_deploy/tests/test_cli_osd.py [deleted file]
ceph_deploy/tests/test_cli_rgw.py

index 50b06a3c8ae7f32b91ab2467a066c443138dcc5f..aeb0778853372cb8ef18860772ed4faf5499b359 100644 (file)
@@ -8,28 +8,6 @@ from ceph_deploy.cli import _main as main
 from ceph_deploy.hosts import remotes
 from ceph_deploy.tests.directory import directory
 
-def test_help(tmpdir, cli):
-    with cli(
-        args=['ceph-deploy', 'admin', '--help'],
-        stdout=subprocess.PIPE,
-        ) as p:
-        result = p.stdout.read()
-    assert 'usage: ceph-deploy admin' in result
-    assert 'positional arguments' in result
-    assert 'optional arguments' in result
-
-
-def test_bad_no_hosts(tmpdir, cli):
-    with pytest.raises(cli.Failed) as err:
-        with cli(
-            args=['ceph-deploy', 'admin'],
-            stderr=subprocess.PIPE,
-            ) as p:
-            result = p.stderr.read()
-    assert 'usage: ceph-deploy admin' in result
-    assert 'too few arguments' in result
-    assert err.value.status == 2
-
 
 def test_bad_no_conf(tmpdir, cli):
     with pytest.raises(cli.Failed) as err:
diff --git a/ceph_deploy/tests/test_cli_osd.py b/ceph_deploy/tests/test_cli_osd.py
deleted file mode 100644 (file)
index 4c8b548..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-import pytest
-import subprocess
-
-
-def test_help(tmpdir, cli):
-    with cli(
-        args=['ceph-deploy', 'osd', '--help'],
-        stdout=subprocess.PIPE,
-        ) as p:
-        result = p.stdout.read()
-    assert 'usage: ceph-deploy osd' in result
-    assert 'positional arguments' in result
-    assert 'optional arguments' in result
-
-
-def test_bad_subcommand(tmpdir, cli):
-    with pytest.raises(cli.Failed) as err:
-        with cli(
-            args=['ceph-deploy', 'osd', 'fakehost:/does-not-exist'],
-            stderr=subprocess.PIPE,
-            ) as p:
-            result = p.stderr.read()
-    assert 'ceph-deploy osd: error' in result
-    assert 'invalid choice' in result
-    assert err.value.status == 2
-
-
-def test_bad_no_disk(tmpdir, cli):
-    with pytest.raises(cli.Failed) as err:
-        with cli(
-            args=['ceph-deploy', 'osd'],
-            stderr=subprocess.PIPE,
-            ) as p:
-            result = p.stderr.read()
-    assert 'usage: ceph-deploy osd' in result
-    assert 'too few arguments' in result
-    assert err.value.status == 2
index 6630f5abcd3d4482aa570cbf5e643b5c9c3d1395..b0b86c462fbe00b8947d288c3fa73da46a3adca4 100644 (file)
@@ -1,32 +1,6 @@
-import pytest
-import subprocess
-
 import ceph_deploy.rgw as rgw
 
 
-def test_help(tmpdir, cli):
-    with cli(
-        args=['ceph-deploy', 'rgw', '--help'],
-        stdout=subprocess.PIPE,
-        ) as p:
-        result = p.stdout.read()
-    assert 'usage: ceph-deploy rgw' in result
-    assert 'positional arguments' in result
-    assert 'optional arguments' in result
-
-
-def test_bad_no_hosts(tmpdir, cli):
-    with pytest.raises(cli.Failed) as err:
-        with cli(
-            args=['ceph-deploy', 'rgw'],
-            stderr=subprocess.PIPE,
-            ) as p:
-            result = p.stderr.read()
-    assert 'usage: ceph-deploy rgw' in result
-    assert 'too few arguments' in result
-    assert err.value.status == 2
-
-
 def test_rgw_prefix_auto():
     daemon = rgw.colon_separated("hostname")
     assert daemon == ("hostname", "rgw.hostname")