From c208b107342582882874bd3c93d49baabbd5ffd1 Mon Sep 17 00:00:00 2001 From: Travis Rhoden Date: Fri, 22 May 2015 13:40:34 -0400 Subject: [PATCH] [RM-11742] Add test for CLI --version Signed-off-by: Travis Rhoden --- ceph_deploy/tests/test_cli.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ceph_deploy/tests/test_cli.py b/ceph_deploy/tests/test_cli.py index f20b7cf..0a045e2 100644 --- a/ceph_deploy/tests/test_cli.py +++ b/ceph_deploy/tests/test_cli.py @@ -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__ -- 2.47.3