]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
ShamanProject: correct ref precedence
authorZack Cerza <zack@redhat.com>
Wed, 21 Sep 2016 23:43:39 +0000 (17:43 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 4 Oct 2016 15:01:21 +0000 (09:01 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/packaging.py
teuthology/test/test_packaging.py

index cc02a3a5408f2a1bdb178c3b3f84011e7cda467e..860e9764e8a430b697a3a3f84af9614a3aaee27e 100644 (file)
@@ -792,10 +792,11 @@ class ShamanProject(GitbuilderProject):
         req_obj['project'] = self.project
         req_obj['flavor'] = flavor
         req_obj['distros'] = '%s/%s' % (self.distro, self.arch)
-        if getattr(self, 'branch', None):
-            req_obj['ref'] = self.branch
-        if self.sha1:
-            req_obj['sha1'] = self.sha1
+        ref_name, ref_val = self._choose_reference().items()[0]
+        if ref_name == 'sha1':
+            req_obj['sha1'] = ref_val
+        else:
+            req_obj['ref'] = ref_val
         req_str = urllib.urlencode(req_obj)
         uri = urlparse.urljoin(
             self.query_url,
index 2d1ff8451ef162e9490f8ca2da3c822757b2bdbf..fc56caca881d26f82aafea8066bbc71892bcb2e0 100644 (file)
@@ -639,7 +639,7 @@ class TestShamanProject(TestBuilderProject):
                 .test_init_from_remote_base_url(
                     "https://shaman.ceph.com/api/search?status=ready"
                     "&project=ceph&flavor=default"
-                    "&distros=ubuntu%2F14.04%2Fx86_64"
+                    "&distros=ubuntu%2F14.04%2Fx86_64&ref=master"
                 )
 
     def test_init_from_remote_base_url_debian(self):
@@ -657,7 +657,7 @@ class TestShamanProject(TestBuilderProject):
                 .test_init_from_remote_base_url_debian(
                     "https://shaman.ceph.com/api/search?status=ready"
                     "&project=ceph&flavor=default"
-                    "&distros=debian%2F7.1%2Fx86_64"
+                    "&distros=debian%2F7.1%2Fx86_64&ref=master"
                 )
 
     def test_init_from_config_base_url(self):