expected = "http://gitbuilder.ceph.com/ceph-deb-trusty-x86_64-basic/ref/master"
assert result == expected
+ @patch("teuthology.packaging.config")
+ @patch("teuthology.packaging._get_config_value_for_remote")
+ def test_init_from_remote_base_url_debian(self, m_get_config_value, m_config):
+ m_config.baseurl_template = 'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}'
+ m_config.gitbuilder_host = "gitbuilder.ceph.com"
+ m_get_config_value.return_value = None
+ # remote.os.codename returns and empty string on debian
+ rem = self._get_remote(distro="debian", codename='', version="7.1")
+ ctx = dict(foo="bar")
+ gp = packaging.GitbuilderProject("ceph", {}, ctx=ctx, remote=rem)
+ result = gp.base_url
+ expected = "http://gitbuilder.ceph.com/ceph-deb-wheezy-x86_64-basic/ref/master"
+ assert result == expected
+
@patch("teuthology.packaging.config")
def test_init_from_config_base_url(self, m_config):
m_config.baseurl_template = 'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}'