From: Zack Cerza Date: Wed, 29 Jun 2016 22:55:22 +0000 (-0600) Subject: GitbuilderProject test: respect branch in config X-Git-Tag: 1.1.0~586^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4d7adfd5075fbe4fc800f029d53551731c8740d4;p=teuthology.git GitbuilderProject test: respect branch in config Signed-off-by: Zack Cerza --- diff --git a/teuthology/test/test_packaging.py b/teuthology/test/test_packaging.py index 365edd1d6d..46aea554c0 100644 --- a/teuthology/test/test_packaging.py +++ b/teuthology/test/test_packaging.py @@ -356,6 +356,21 @@ class TestGitbuilderProject(object): expected = "http://gitbuilder.ceph.com/ceph-deb-trusty-x86_64-basic/sha1/sha1" assert result == expected + @patch("teuthology.packaging.config") + def test_init_from_config_branch_ref(self, m_config): + m_config.baseurl_template = \ + 'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}' + m_config.gitbuilder_host = "gitbuilder.ceph.com" + config = dict( + os_type="ubuntu", + os_version="14.04", + branch='jewel', + ) + gp = packaging.GitbuilderProject("ceph", config) + result = gp.uri_reference + expected = 'ref/jewel' + assert result == expected + @patch("teuthology.packaging.config") @patch("teuthology.packaging._get_config_value_for_remote") @patch("teuthology.packaging._get_response")