]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
tests for the added behavior
authorAlfredo Deza <adeza@redhat.com>
Wed, 13 May 2015 18:15:32 +0000 (14:15 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 13 May 2015 18:15:32 +0000 (14:15 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph_deploy/tests/test_install.py

index c6df508d991cfe2f55f334b809a6750544047cbd..4d4dcddbe1876c5587a7f3d84d42e5e9db3b7027 100644 (file)
@@ -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'
+        ])