From: Alfredo Deza Date: Wed, 13 May 2015 18:15:32 +0000 (-0400) Subject: tests for the added behavior X-Git-Tag: v1.5.24~7^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=02fb2ec1a3ae6f69d36292ee1f1b5188f5b1d3e2;p=ceph-deploy.git tests for the added behavior Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/tests/test_install.py b/ceph_deploy/tests/test_install.py index c6df508..4d4dcdd 100644 --- a/ceph_deploy/tests/test_install.py +++ b/ceph_deploy/tests/test_install.py @@ -49,8 +49,14 @@ class TestDetectComponents(object): self.args.install_osd = False self.args.install_rgw = False self.args.install_ceph = False + self.args.repo = False self.distro = Mock() + def test_install_with_repo_option_returns_no_packages(self): + self.args.repo = True + result = install.detect_components(self.args, self.distro) + assert result == [] + def test_install_all_returns_all_packages_deb(self): self.args.install_all = True self.distro.is_rpm = False @@ -72,7 +78,6 @@ class TestDetectComponents(object): 'ceph-osd', 'ceph-mds', 'ceph-mon', 'radosgw' ]) - def test_install_all_returns_all_packages_rpm(self): self.args.install_all = True result = sorted(install.detect_components(self.args, self.distro)) @@ -100,3 +105,9 @@ class TestDetectComponents(object): self.args.install_mds = True result = sorted(install.detect_components(self.args, self.distro)) assert result == sorted(['ceph-osd', 'ceph-mds']) + + def test_install_all_should_be_default_when_no_options_passed(self): + result = sorted(install.detect_components(self.args, self.distro)) + assert result == sorted([ + 'ceph-osd', 'ceph-mds', 'ceph-mon', 'ceph-radosgw' + ])