]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-11742] Add test for CLI --version
authorTravis Rhoden <trhoden@redhat.com>
Fri, 22 May 2015 17:40:34 +0000 (13:40 -0400)
committerTravis Rhoden <trhoden@redhat.com>
Fri, 22 May 2015 17:40:34 +0000 (13:40 -0400)
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
ceph_deploy/tests/test_cli.py

index f20b7cf0c2ed58ea82935d71d35e950fbd66d4a4..0a045e2970f3f51f60e4a999db7e4d5b99226b9b 100644 (file)
@@ -1,6 +1,8 @@
 import pytest
 import subprocess
 
+import ceph_deploy
+
 
 def test_help(tmpdir, cli):
     with cli(
@@ -35,3 +37,12 @@ def test_bad_cluster(tmpdir, cli):
     assert 'usage: ceph-deploy' in result
     assert err.value.status == 2
     assert [f.basename for f in tmpdir.listdir()] == []
+
+
+def test_version(tmpdir, cli):
+    with cli(
+        args=['ceph-deploy', '--version'],
+        stderr=subprocess.PIPE,
+    ) as p:
+        result = p.stderr.read().strip()
+        assert result == ceph_deploy.__version__