Switch to smart HTTP mode.
Gerrit actually only speaks smart http, but we were assuming
dumb HTTP (which is provided in OpenStack's configuration).
Change-Id: Id299f53a6be6fc1670edf1da4b3353115bf1e31e
Reviewed-on: https://review.openstack.org/13146
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index cacf4a9..41848f6 100644
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -580,11 +580,16 @@
res = urlparse.urlparse(self.url)
path = res.path
project = '/'.join(path.split('/')[2:-2])
- ret = ''
+ ret = '001e# service=git-upload-pack\n'
+ ret += ('000000a31270149696713ba7e06f1beb760f20d359c4abed HEAD\x00'
+ 'multi_ack thin-pack side-band side-band-64k ofs-delta '
+ 'shallow no-progress include-tag multi_ack_detailed no-done\n')
path = os.path.join(UPSTREAM_ROOT, project)
repo = git.Repo(path)
for ref in repo.refs:
- ret += ref.object.hexsha + '\t' + ref.path + '\n'
+ r = ref.object.hexsha + ' ' + ref.path + '\n'
+ ret += '%04x%s' % (len(r) + 4, r)
+ ret += '0000'
return ret