Beispiel #1
0
 def test_verify_ceph_version_success(self, m_get_package_version,
                                      m_gitbuilder_project):
     gb = Mock()
     gb.version = "0.89.0"
     gb.project = "ceph"
     m_gitbuilder_project.return_value = gb
     m_get_package_version.return_value = "0.89.0"
     install.verify_package_version(Mock(), Mock(), Mock())
Beispiel #2
0
 def test_skip_when_using_ceph_deploy(self, m_get_package_version, m_block,
                                      m_get_baseurl):
     m_block.return_value = "0.89.0"
     # ceph isn't installed because ceph-deploy would install it
     m_get_package_version.return_value = None
     config = Mock()
     config.extras = True
     install.verify_package_version(Mock(), config, Mock())
Beispiel #3
0
 def test_verify_ceph_version_failed(self, m_get_package_version, m_block,
                                     m_get_baseurl):
     m_block.return_value = "0.89.0"
     m_get_package_version.return_value = "0.89.1"
     config = Mock()
     # when it looks for config.get('extras') it won't find it
     config.get.return_value = False
     with pytest.raises(RuntimeError):
         install.verify_package_version(Mock(), config, Mock())
Beispiel #4
0
 def test_verify_ceph_version_failed(self, m_get_package_version,
                                     m_gitbuilder_project):
     gb = Mock()
     gb.version = "0.89.0"
     gb.project = "ceph"
     m_gitbuilder_project.return_value = gb
     m_get_package_version.return_value = "0.89.1"
     config = dict()
     with pytest.raises(RuntimeError):
         install.verify_package_version(Mock(), config, Mock())
Beispiel #5
0
 def test_verify_ceph_version_failed(self, m_get_package_version,
                                     m_gitbuilder_project):
     gb = Mock()
     gb.version = "0.89.0"
     gb.project = "ceph"
     m_gitbuilder_project.return_value = gb
     m_get_package_version.return_value = "0.89.1"
     config = dict()
     with pytest.raises(RuntimeError):
         install.verify_package_version(Mock(), config, Mock())
Beispiel #6
0
 def test_skip_when_using_ceph_deploy(self, m_get_package_version,
                                      m_gitbuilder_project):
     gb = Mock()
     gb.version = "0.89.0"
     gb.project = "ceph"
     m_gitbuilder_project.return_value = gb
     # ceph isn't installed because ceph-deploy would install it
     m_get_package_version.return_value = None
     config = Mock()
     config.extras = True
     install.verify_package_version(Mock(), config, Mock())
Beispiel #7
0
 def test_verify_ceph_version_failed(self, m_get_package_version,
                                     m_gitbuilder_project):
     gb = Mock()
     gb.version = "0.89.0"
     gb.project = "ceph"
     m_gitbuilder_project.return_value = gb
     m_get_package_version.return_value = "0.89.1"
     config = Mock()
     # when it looks for config.get('extras') it won't find it
     config.get.return_value = False
     with pytest.raises(RuntimeError):
         install.verify_package_version(Mock(), config, Mock())
Beispiel #8
0
 def test_verify_ceph_version_success(self, m_get_package_version, m_block,
                                      m_get_baseurl):
     m_block.return_value = "0.89.0"
     m_get_package_version.return_value = "0.89.0"
     install.verify_package_version(Mock(), Mock(), Mock())