Mercurial > public > mercurial-scm > hg
diff tests/test-hgweb-no-path-info.t @ 31008:636cf3f7620d
tests: use LOCALIP
This patch replaces hardcoded 127.0.0.1 with $LOCALIP in all tests.
Till now, the IPv6 series should make tests pass on common IPv6 systems
where the local device has the address "::1" and the hostname "localhost"
resolves to "::1".
author | Jun Wu <quark@fb.com> |
---|---|
date | Thu, 16 Feb 2017 09:38:52 -0800 |
parents | fe7158fced4b |
children | 75be14993fda |
line wrap: on
line diff
--- a/tests/test-hgweb-no-path-info.t Wed Feb 15 23:24:03 2017 -0800 +++ b/tests/test-hgweb-no-path-info.t Thu Feb 16 09:38:52 2017 -0800 @@ -49,7 +49,7 @@ > 'REQUEST_METHOD': 'GET', > 'PATH_INFO': '/', > 'SCRIPT_NAME': '', - > 'SERVER_NAME': '127.0.0.1', + > 'SERVER_NAME': '$LOCALIP', > 'SERVER_PORT': os.environ['HGPORT'], > 'SERVER_PROTOCOL': 'HTTP/1.0' > } @@ -79,16 +79,16 @@ <?xml version="1.0" encoding="ascii"?> <feed xmlns="http://www.w3.org/2005/Atom"> <!-- Changelog --> - <id>http://127.0.0.1:$HGPORT/</id> (glob) - <link rel="self" href="http://127.0.0.1:$HGPORT/atom-log"/> (glob) - <link rel="alternate" href="http://127.0.0.1:$HGPORT/"/> (glob) + <id>http://$LOCALIP:$HGPORT/</id> (glob) + <link rel="self" href="http://$LOCALIP:$HGPORT/atom-log"/> (glob) + <link rel="alternate" href="http://$LOCALIP:$HGPORT/"/> (glob) <title>repo Changelog</title> <updated>1970-01-01T00:00:00+00:00</updated> <entry> <title>[default] test</title> - <id>http://127.0.0.1:$HGPORT/#changeset-61c9426e69fef294feed5e2bbfc97d39944a5b1c</id> (glob) - <link href="http://127.0.0.1:$HGPORT/rev/61c9426e69fe"/> (glob) + <id>http://$LOCALIP:$HGPORT/#changeset-61c9426e69fef294feed5e2bbfc97d39944a5b1c</id> (glob) + <link href="http://$LOCALIP:$HGPORT/rev/61c9426e69fe"/> (glob) <author> <name>test</name> <email>test</email>