Mercurial > public > mercurial-scm > hg
comparison tests/wireprotosimplecache.py @ 40170:f7ff5b4fe745
tests: use baseurl instead of advertisedbaseurl
The distinction matters for e.g. hosts behind load balancers. But for
the test environment, it doesn't matter.
For whatever reason, advertisedbaseurl is resolving to
http://1.0.0.127.in-addr.arpa:$HGPORT on my MBP. This hostname fails
to resolve, causing the test to fail. No clue what's up with that
behavior.
Differential Revision: https://phab.mercurial-scm.org/D4973
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 11 Oct 2018 09:26:05 +0200 |
parents | b099e6032f38 |
children | b27bcf81071b |
comparison
equal
deleted
inserted
replaced
40169:461583f2125b | 40170:f7ff5b4fe745 |
---|---|
125 if redirectable: | 125 if redirectable: |
126 paths = self.req.dispatchparts[:-3] | 126 paths = self.req.dispatchparts[:-3] |
127 paths.append(b'simplecache') | 127 paths.append(b'simplecache') |
128 paths.append(self.key) | 128 paths.append(self.key) |
129 | 129 |
130 url = b'%s/%s' % (self.req.advertisedbaseurl, b'/'.join(paths)) | 130 url = b'%s/%s' % (self.req.baseurl, b'/'.join(paths)) |
131 | 131 |
132 #url = b'http://example.com/%s' % self.key | 132 #url = b'http://example.com/%s' % self.key |
133 self.ui.log('simplecache', 'sending content redirect for %s to ' | 133 self.ui.log('simplecache', 'sending content redirect for %s to ' |
134 '%s\n', self.key, url) | 134 '%s\n', self.key, url) |
135 response = wireprototypes.alternatelocationresponse( | 135 response = wireprototypes.alternatelocationresponse( |