From 28168987c7b3f99b05834758bb589b78d1079412 Mon Sep 17 00:00:00 2001 From: Deepika Upadhyay Date: Thu, 16 Sep 2021 18:19:43 +0530 Subject: [PATCH] remove gitbuilder tests gitbuilder has been replaced by shaman project and no longer being used, the same functional testing we are doing with TestShamanProject, therefore there is no need to maintain testing for obsolete code. Signed-off-by: Deepika Upadhyay --- teuthology/test/test_packaging.py | 94 ------------------------------- 1 file changed, 94 deletions(-) diff --git a/teuthology/test/test_packaging.py b/teuthology/test/test_packaging.py index 2d97ac81c4..baeba956cc 100644 --- a/teuthology/test/test_packaging.py +++ b/teuthology/test/test_packaging.py @@ -527,100 +527,6 @@ class TestBuilderProject(object): assert gp.dist_release == expected -class TestGitbuilderProject(TestBuilderProject): - klass = packaging.GitbuilderProject - - def setup(self): - self.p_config = patch('teuthology.packaging.config') - self.m_config = self.p_config.start() - self.m_config.baseurl_template = \ - 'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}' - self.m_config.gitbuilder_host = "gitbuilder.ceph.com" - self.p_get_config_value = \ - patch('teuthology.packaging._get_config_value_for_remote') - self.m_get_config_value = self.p_get_config_value.start() - self.m_get_config_value.return_value = None - self.p_get = patch('requests.get') - self.m_get = self.p_get.start() - self.p_get_response = patch("teuthology.packaging._get_response") - self.m_get_response = self.p_get_response.start() - - def teardown(self): - self.p_config.stop() - self.p_get_config_value.stop() - self.p_get.stop() - self.p_get_response.stop() - - def test_init_from_remote_base_url(self, expected=None): - super(TestGitbuilderProject, self)\ - .test_init_from_remote_base_url( - "http://gitbuilder.ceph.com/" - "ceph-deb-trusty-x86_64-basic/ref/master" - ) - - def test_init_from_remote_base_url_debian(self): - super(TestGitbuilderProject, self)\ - .test_init_from_remote_base_url_debian( - "http://gitbuilder.ceph.com/" - "ceph-deb-wheezy-x86_64-basic/ref/master" - ) - - def test_init_from_config_base_url(self): - super(TestGitbuilderProject, self).test_init_from_config_base_url( - "http://gitbuilder.ceph.com/ceph-deb-trusty-x86_64-basic/sha1/sha1" - ) - - def test_get_package_version_found(self): - resp = Mock() - resp.ok = True - resp.text = "0.90.0" - self.m_get_response.return_value = resp - super(TestGitbuilderProject, self)\ - .test_get_package_version_found() - - def test_version_strip_v(self): - resp = Mock() - resp.ok = True - resp.text = "v0.90.0" - self.m_get_response.return_value = resp - super(TestGitbuilderProject, self)\ - .test_get_package_version_found() - - def test_get_package_sha1_fetched_found(self): - resp = Mock() - resp.ok = True - resp.text = "the_sha1" - self.m_get.return_value = resp - super(TestGitbuilderProject, self)\ - .test_get_package_sha1_fetched_found() - - def test_get_package_sha1_fetched_not_found(self): - resp = Mock() - resp.ok = False - self.m_get.return_value = resp - super(TestGitbuilderProject, self)\ - .test_get_package_sha1_fetched_not_found() - - DISTRO_MATRIX = [ - ('rhel', '7.0', None, 'centos7'), - ('centos', '6.5', None, 'centos6'), - ('centos', '7.0', None, 'centos7'), - ('centos', '7.1', None, 'centos7'), - ('centos', '8.1', None, 'centos8'), - ('fedora', '20', None, 'fedora20'), - ('ubuntu', '14.04', 'trusty', 'trusty'), - ('ubuntu', '14.04', None, 'trusty'), - ('debian', '7.0', None, 'wheezy'), - ('debian', '7', None, 'wheezy'), - ('debian', '7.1', None, 'wheezy'), - ('ubuntu', '12.04', None, 'precise'), - ('ubuntu', '14.04', None, 'trusty'), - ('ubuntu', '16.04', None, 'xenial'), - ('ubuntu', '18.04', None, 'bionic'), - ('ubuntu', '20.04', None, 'focal'), - ] - - class TestShamanProject(TestBuilderProject): klass = packaging.ShamanProject -- 2.39.5