launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02348
[Merge] lp:~stub/launchpad/librarian-layer into lp:launchpad
Stuart Bishop has proposed merging lp:~stub/launchpad/librarian-layer into lp:launchpad with lp:~lifeless/launchpad/librarian as a prerequisite.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stub/launchpad/librarian-layer/+merge/44466
Fixes required to get lp:~lifeless/launchpad/librarian landed
--
https://code.launchpad.net/~stub/launchpad/librarian-layer/+merge/44466
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stub/launchpad/librarian-layer into lp:launchpad.
=== modified file 'lib/canonical/config/fixture.py'
--- lib/canonical/config/fixture.py 2010-10-30 19:22:58 +0000
+++ lib/canonical/config/fixture.py 2011-01-17 22:09:44 +0000
@@ -28,7 +28,6 @@
_extend_str = dedent("""\
[meta]
extends: ../%s/launchpad-lazr.conf
-
""")
def __init__(self, instance_name, copy_from_instance):
=== modified file 'lib/canonical/config/tests/test_fixture.py'
--- lib/canonical/config/tests/test_fixture.py 2010-10-19 19:23:19 +0000
+++ lib/canonical/config/tests/test_fixture.py 2011-01-17 22:09:44 +0000
@@ -50,11 +50,8 @@
confpath = 'configs/testtestconfig/launchpad-lazr.conf'
lazr_config = open(confpath, 'rb').read()
self.assertEqual(
- dedent("""\
- [meta]
- extends: ../testrunner/launchpad-lazr.conf
-
- """),
- lazr_config)
+ "[meta]\n"
+ "extends: ../testrunner/launchpad-lazr.conf",
+ lazr_config.strip())
finally:
fixture.cleanUp()
=== modified file 'lib/canonical/launchpad/doc/canonical-config.txt'
--- lib/canonical/launchpad/doc/canonical-config.txt 2010-11-27 21:42:32 +0000
+++ lib/canonical/launchpad/doc/canonical-config.txt 2011-01-17 22:09:44 +0000
@@ -24,14 +24,6 @@
'launchpad_main'
>>> config.librarian.dbuser
'librarian'
- >>> config.librarian.upload_host
- 'localhost'
- >>> config.librarian.upload_port
- 59090
- >>> config.librarian.download_host
- 'localhost'
- >>> config.librarian.download_port
- 58000
Configs are kept from the 'configs' directory.
=== modified file 'lib/canonical/launchpad/doc/librarian.txt'
--- lib/canonical/launchpad/doc/librarian.txt 2010-11-06 12:50:22 +0000
+++ lib/canonical/launchpad/doc/librarian.txt 2011-01-17 22:09:44 +0000
@@ -78,9 +78,11 @@
We can get its URL too
+ >>> from canonical.config import config
>>> import re
>>> re.search(
- ... r'^http://localhost:58000/\d+/text.txt$', alias.http_url
+ ... r'^%s\d+/text.txt$' % config.librarian.download_url,
+ ... alias.http_url
... ) is not None
True
@@ -88,19 +90,17 @@
and similar inline-presented objects which would trigger security warnings on
https pages otherwise.
- >>> re.search(
- ... r'^https://localhost:58000/\d+/text.txt$', alias.https_url
- ... ) is not None
+ >>> re.search(r'^https://.+/\d+/text.txt$', alias.https_url) is not None
True
And we even have a convenient method which returns either the http URL or the
https one, depending on a config value.
- >>> from canonical.config import config
>>> config.vhosts.use_https
False
>>> re.search(
- ... r'^http://localhost:58000/\d+/text.txt$', alias.getURL()
+ ... r'^%s\d+/text.txt$' % config.librarian.download_url,
+ ... alias.getURL()
... ) is not None
True
@@ -111,7 +111,7 @@
... """)
>>> config.push('test', test_data)
>>> re.search(
- ... r'^https://localhost:58000/\d+/text.txt$', alias.https_url
+ ... r'^https://.+/\d+/text.txt$', alias.https_url
... ) is not None
True
@@ -208,15 +208,17 @@
>>> f.read()
'This is some data'
>>> url = client.getURLForAlias(aid)
- >>> re.search(r'^http://localhost:58000/\d+/text.txt$', url) is not None
+ >>> re.search(
+ ... r'^%s\d+/text.txt$' % config.librarian.download_url, url
+ ... ) is not None
True
When secure=True, the returned url has the id as part of the domain name and
the protocol is https:
- >>> expected = 'https://i%d.restricted.localhost:58000/%d/text.txt' % (
- ... aid, aid)
- >>> expected == client.getURLForAlias(aid, secure=True)
+ >>> expected = r'^https://i%d\..+:\d+/%d/text.txt$' % (aid, aid)
+ >>> found = client.getURLForAlias(aid, secure=True)
+ >>> re.search(expected, found) is not None
True
@@ -250,7 +252,7 @@
... 'text.txt', len(data), StringIO(data), 'text/plain'
... )
>>> print url
- http://localhost:58000/.../text.txt
+ http://.../text.txt
>>> from urllib2 import urlopen
>>> urlopen(url).read()
'This is some data'
@@ -277,7 +279,7 @@
client can't see the database records yet).
>>> import re
- >>> match = re.search('^http://localhost:\d+/(\d+)/', url)
+ >>> match = re.search('/(\d+)/', url)
>>> alias_id = int(match.group(1))
>>> alias = lfas[alias_id]
>>> print alias.expires.isoformat()
@@ -311,7 +313,10 @@
True
>>> print file_alias.http_url
- http://localhost:58005/.../private.txt
+ http://.../private.txt
+ >>> file_alias.http_url.startswith(
+ ... config.librarian.restricted_download_url)
+ True
>>> transaction.commit()
>>> file_alias.open()
@@ -339,7 +344,7 @@
>>> file_url = restricted_client.getURLForAlias(private_file_id)
>>> print file_url
- http://localhost:58005/.../private.txt
+ http://.../private.txt
Trying to access that file directly on the normal librarian will fail
(by switching the port)
@@ -386,7 +391,9 @@
... 'another-private.txt', len(private_content),
... StringIO(private_content), 'text/plain')
>>> print url
- http://localhost:58005/.../another-private.txt
+ http://.../another-private.txt
+ >>> url.startswith(config.librarian.restricted_download_url)
+ True
The file can then immediately be retrieved:
@@ -450,7 +457,7 @@
>>> f.read()
'This is some data'
>>> url = client.getURLForAlias(aid)
- >>> re.search(r'^http://localhost:58000/\d+/hot%20dog$', url) is not None
+ >>> re.search(r'/\d+/hot%20dog$', url) is not None
True
Unicode file names work. Note that the filename in the resulting URL
@@ -463,7 +470,7 @@
>>> f.read()
'This is some data'
>>> url = client.getURLForAlias(aid)
- >>> re.search(r'^http://localhost:58000/\d+/Yow%E2%80%BD$', url) is not None
+ >>> re.search(r'/\d+/Yow%E2%80%BD$', url) is not None
True
Files will get garbage collected on production systems as per
=== modified file 'lib/canonical/launchpad/doc/message.txt'
--- lib/canonical/launchpad/doc/message.txt 2010-10-18 22:24:59 +0000
+++ lib/canonical/launchpad/doc/message.txt 2011-01-17 22:09:44 +0000
@@ -175,8 +175,6 @@
>>> blob = chunks[1].blob
>>> blob.filename
u'anna.jpg.exe'
- >>> blob.http_url.startswith(u'http://localhost:58000/')
- True
>>> blob.http_url.endswith(u'/anna.jpg.exe')
True
=== modified file 'lib/canonical/launchpad/doc/old-testing.txt'
--- lib/canonical/launchpad/doc/old-testing.txt 2011-01-17 22:09:28 +0000
+++ lib/canonical/launchpad/doc/old-testing.txt 2011-01-17 22:09:44 +0000
@@ -153,7 +153,8 @@
>>> from canonical.librarian.interfaces import ILibrarianClient
>>> from StringIO import StringIO
->>> librarian = LibrarianServerFixture()
+>>> from canonical.testing.layers import BaseLayer
+>>> librarian = LibrarianServerFixture(BaseLayer.config_fixture)
>>> librarian.setUp()
>>> login(ANONYMOUS)
=== modified file 'lib/canonical/launchpad/pagetests/webservice/xx-hostedfile.txt'
--- lib/canonical/launchpad/pagetests/webservice/xx-hostedfile.txt 2009-04-17 10:32:16 +0000
+++ lib/canonical/launchpad/pagetests/webservice/xx-hostedfile.txt 2011-01-17 22:09:44 +0000
@@ -57,21 +57,21 @@
>>> print result
HTTP/1.1 303 See Other
...
- Location: http://localhost:58000/.../icon
+ Location: http://.../icon
...
>>> result = webservice.get(project['logo_link'])
>>> print result
HTTP/1.1 303 See Other
...
- Location: http://localhost:58000/.../logo
+ Location: http://.../logo
...
>>> result = webservice.get(project['brand_link'])
>>> print result
HTTP/1.1 303 See Other
...
- Location: http://localhost:58000/.../brand
+ Location: http://.../brand
...
=== modified file 'lib/canonical/launchpad/scripts/ftests/librarianformatter.txt'
--- lib/canonical/launchpad/scripts/ftests/librarianformatter.txt 2010-11-06 12:50:22 +0000
+++ lib/canonical/launchpad/scripts/ftests/librarianformatter.txt 2011-01-17 22:09:44 +0000
@@ -72,10 +72,10 @@
>>> librarian_log.error('Oops', exc_info=exception)
>>> print librarian_out.getvalue()
ERROR Oops
- -> http://localhost:58000/...txt (An Exception)
+ -> http://.../....txt (An Exception)
>>> url = librarian_out.getvalue().splitlines()[-1].split()[1:2][0]
>>> print url
-http://localhost:58000/...txt
+http://.../....txt
>>> print urlopen(url).read()
Traceback (most recent call last):
...
@@ -116,9 +116,9 @@
... librarian_log.exception('Dud2')
>>> print librarian_out.getvalue()
ERROR Dud1
- -> http://localhost:58000/...txt (Dud)
+ -> http://.../....txt (Dud)
ERROR Dud2
- -> http://localhost:58000/...txt (Dud)
+ -> http://.../....txt (Dud)
<BLANKLINE>
The end result of this is to not have scripts display exceptions to
@@ -134,8 +134,8 @@
>>> print out
Script Output
ERROR Oops
- -> http://localhost:58000/...txt (Aargh)
+ -> http://.../....txt (Aargh)
ERROR Root oops
- -> http://localhost:58000/...txt (Aargh)
+ -> http://.../....txt (Aargh)
=== modified file 'lib/canonical/librarian/ftests/test_web.py'
--- lib/canonical/librarian/ftests/test_web.py 2010-11-06 12:50:22 +0000
+++ lib/canonical/librarian/ftests/test_web.py 2011-01-17 22:09:44 +0000
@@ -162,11 +162,6 @@
aid, filename)
self.require404(self._makeURL(aid, 'different.txt'))
- def _makeURL(self, aliasID, filename):
- host = config.librarian.download_host
- port = config.librarian.download_port
- return 'http://%s:%d/%d/%s' % (host, port, aliasID, filename)
-
def test_404(self):
client = LibrarianClient()
filename = 'sample.txt'
@@ -175,13 +170,13 @@
url = client.getURLForAlias(aid)
self.assertEqual(urlopen(url).read(), 'sample')
- # Ensure our helper is working
- self.failUnlessEqual(url, self._makeURL(aid, filename))
-
# Change the aliasid and assert we get a 404
- self.require404(self._makeURL(aid+1, filename))
+ self.failUnless(str(aid) in url)
+ self.require404(url.replace(str(aid), str(aid+1)))
+
# Change the filename and assert we get a 404
- self.require404(self._makeURL(aid, 'different.txt'))
+ self.failUnless(str(filename) in url)
+ self.require404(url.replace(filename, 'different.txt'))
def test_duplicateuploads(self):
client = LibrarianClient()
=== modified file 'lib/canonical/librarian/testing/server.py'
--- lib/canonical/librarian/testing/server.py 2011-01-17 22:09:28 +0000
+++ lib/canonical/librarian/testing/server.py 2011-01-17 22:09:44 +0000
@@ -44,11 +44,18 @@
:ivar pid: pid of the external process.
"""
- def __init__(self):
+ def __init__(self, config_fixture):
+ """Initialize the LibrarianServerFixture.
+
+ :param config_fixture: The ConfigFixture in use by our tests.
+ In the layered environment, this is
+ BaseLayer.config_fixture.
+ """
Fixture.__init__(self)
self._pid = None
# Track whether the fixture has been setup or not.
self._setup = False
+ self.config_fixture = config_fixture
def setUp(self):
"""Start both librarian instances."""
@@ -69,6 +76,11 @@
self._setup = True
self.addCleanup(setattr, self, '_setup', False)
+ # Update the config our tests are using to know about the
+ # correct ports.
+ self.config_fixture.add_section(self.service_config)
+ config.reloadConfig()
+
def cleanUp(self):
"""Shut downs both librarian instances."""
if self._persistent_servers():
@@ -167,7 +179,7 @@
download_url: http://launchpad.dev:%s/
restricted_download_port: %s
restricted_upload_port: %s
- restricted_download_url: http://launchpad_dev:%s/
+ restricted_download_url: http://launchpad.dev:%s/
""") % (
self.root,
self.download_port,
=== modified file 'lib/canonical/librarian/testing/tests/test_server_fixture.py'
--- lib/canonical/librarian/testing/tests/test_server_fixture.py 2011-01-17 22:09:28 +0000
+++ lib/canonical/librarian/testing/tests/test_server_fixture.py 2011-01-17 22:09:44 +0000
@@ -66,7 +66,7 @@
download_url: http://launchpad.dev:%s/
restricted_download_port: %s
restricted_upload_port: %s
- restricted_download_url: http://launchpad_dev:%s/
+ restricted_download_url: http://launchpad.dev:%s/
""") % (
fixture.root,
fixture.download_port,
=== modified file 'lib/canonical/testing/ftests/test_layers.py'
--- lib/canonical/testing/ftests/test_layers.py 2011-01-17 22:09:28 +0000
+++ lib/canonical/testing/ftests/test_layers.py 2011-01-17 22:09:44 +0000
@@ -55,7 +55,7 @@
class BaseLayerIsolator(Fixture):
"""A fixture for isolating BaseLayer.
-
+
This is useful to test interactions with LP_PERSISTENT_TEST_SERVICES
which makes tests within layers unable to test that easily.
"""
@@ -113,7 +113,7 @@
self.assertEqual(None, os.environ.get('LP_TEST_INSTANCE'))
def test_persist_test_services_disables_LP_TEST_INSTANCE(self):
- self.useFixture(BaseLayerIsolator())
+ self.useFixture(BaseLayerIsolator(with_persistent=True))
with LayerFixture(BaseLayer):
self.assertEqual(None, os.environ.get('LP_TEST_INSTANCE'))
self.assertEqual(None, os.environ.get('LP_TEST_INSTANCE'))
=== modified file 'lib/canonical/testing/layers.py'
--- lib/canonical/testing/layers.py 2011-01-17 22:09:28 +0000
+++ lib/canonical/testing/layers.py 2011-01-17 22:09:44 +0000
@@ -820,12 +820,16 @@
"_reset_between_tests changed before LibrarianLayer "
"was actually used."
)
- cls.librarian_fixture = LibrarianServerFixture()
+ cls.librarian_fixture = LibrarianServerFixture(
+ BaseLayer.config_fixture)
cls.librarian_fixture.setUp()
- BaseLayer.config.add_section(cls.librarian_fixture.service_config)
- config.reloadConfig()
cls._check_and_reset()
+ # Make sure things using the appserver config know the
+ # correct Librarian port numbers.
+ cls.appserver_config_fixture.add_section(
+ cls.librarian_fixture.service_config)
+
@classmethod
@profiled
def tearDown(cls):
@@ -841,9 +845,8 @@
try:
if not cls._reset_between_tests:
raise LayerInvariantError(
- "_reset_between_tests not reset before LibrarianLayer "
- "shutdown"
- )
+ "_reset_between_tests not reset before "
+ "LibrarianLayer shutdown")
finally:
librarian.cleanUp()
@@ -947,7 +950,7 @@
@profiled
def tearDown(cls):
pass
-
+
@classmethod
@profiled
def testSetUp(cls):
=== modified file 'lib/lp/bugs/browser/tests/test_bugattachment_file_access.py'
--- lib/lp/bugs/browser/tests/test_bugattachment_file_access.py 2011-01-06 11:49:00 +0000
+++ lib/lp/bugs/browser/tests/test_bugattachment_file_access.py 2011-01-17 22:09:44 +0000
@@ -88,7 +88,7 @@
next_view, traversal_path = view.browserDefault(request)
self.assertIsInstance(next_view, RedirectionView)
mo = re.match(
- '^http://localhost:58000/\d+/foo.txt$', next_view.target)
+ '^http://.*/\d+/foo.txt$', next_view.target)
self.assertIsNot(None, mo)
def test_access_to_restricted_file(self):
=== modified file 'lib/lp/bugs/stories/webservice/xx-bug.txt'
--- lib/lp/bugs/stories/webservice/xx-bug.txt 2010-12-20 17:42:47 +0000
+++ lib/lp/bugs/stories/webservice/xx-bug.txt 2011-01-17 22:09:44 +0000
@@ -1278,7 +1278,7 @@
HTTP/1.1 303 See Other...
Content-Length: 0
Content-Type: text/plain
- Location: http://localhost:58000/.../numbers.txt
+ Location: http://.../numbers.txt
...
>>> from urllib2 import urlopen
=== modified file 'lib/lp/code/stories/branches/xx-person-portlet-teambranches.txt'
--- lib/lp/code/stories/branches/xx-person-portlet-teambranches.txt 2010-04-20 04:14:18 +0000
+++ lib/lp/code/stories/branches/xx-person-portlet-teambranches.txt 2011-01-17 22:09:44 +0000
@@ -36,6 +36,6 @@
Branches owned by
>>> print tb.li
<li>
- <img src="http://localhost:58000/.../vikings.png" width="14" height="14" />
+ <img src="http://.../vikings.png" width="14" height="14" />
<a href="/~vikings">Vikings</a>
</li>
=== modified file 'lib/lp/hardwaredb/stories/hwdb/02-view-submissions.txt'
--- lib/lp/hardwaredb/stories/hwdb/02-view-submissions.txt 2010-02-02 17:12:29 +0000
+++ lib/lp/hardwaredb/stories/hwdb/02-view-submissions.txt 2011-01-17 22:09:44 +0000
@@ -28,7 +28,7 @@
>>> download_link = anon_browser.getLink('test.txt')
>>> download_link.url
- 'http://localhost:58000/.../test.txt'
+ 'http://.../test.txt'
>>> raw_link = anon_browser.getLink('text')
>>> raw_link.url
@@ -158,7 +158,7 @@
Distribution-Series: 5.04
Architecture: i386
System: Fujitsu_CY26
- Submission URL: http://localhost:58000/.../test.txt
+ Submission URL: http://.../test.txt
Private submissions can't be viewed anonymously:
@@ -181,7 +181,7 @@
Distribution-Series: 5.04
Architecture: i386
System: Black Box 42
- Submission URL: http://localhost:58000/.../teamtest.txt
+ Submission URL: http://.../teamtest.txt
== Submissions listed by fingerprint ==
=== modified file 'lib/lp/hardwaredb/stories/webservice/xx-hwdb.txt'
--- lib/lp/hardwaredb/stories/webservice/xx-hwdb.txt 2010-02-02 17:12:29 +0000
+++ lib/lp/hardwaredb/stories/webservice/xx-hwdb.txt 2011-01-17 22:09:44 +0000
@@ -540,7 +540,7 @@
HTTP/1.1 303 See Other...
Content-Length: 0
Content-Type: text/plain
- Location: http://localhost:58000/92/sample-submission-2.xml
+ Location: http://.../92/sample-submission-2.xml
...
A 404 error is returned when a client tries to access a non-existent
=== modified file 'lib/lp/registry/stories/product/xx-product-files.txt'
--- lib/lp/registry/stories/product/xx-product-files.txt 2010-09-24 20:49:42 +0000
+++ lib/lp/registry/stories/product/xx-product-files.txt 2011-01-17 22:09:44 +0000
@@ -516,7 +516,7 @@
>>> location = redirect_resp.getOutput().split("\n")[3]
>>> redirect_url = location.split()[1]
>>> print redirect_url
- https://localhost:58000/.../foo.txt
+ https://.../foo.txt
However if the original scheme is http then the redirect URL should be
over http.
@@ -528,7 +528,7 @@
>>> location = redirect_resp.getOutput().split("\n")[3]
>>> redirect_url = location.split()[1]
>>> print redirect_url
- http://localhost:58000/.../foo.txt
+ http://.../foo.txt
When 'use_https' is False the result will always be http.
@@ -548,7 +548,7 @@
>>> location = redirect_resp.getOutput().split("\n")[3]
>>> redirect_url = location.split()[1]
>>> print redirect_url
- http://localhost:58000/.../foo.txt
+ http://.../foo.txt
>>> redirect_resp = http(dedent("""\
... GET %s HTTP/1.1
@@ -557,7 +557,7 @@
>>> location = redirect_resp.getOutput().split("\n")[3]
>>> redirect_url = location.split()[1]
>>> print redirect_url
- http://localhost:58000/.../foo.txt
+ http://.../foo.txt
Return 'use_https' to its original value to not mess up future tests.
=== modified file 'lib/lp/registry/stories/webservice/xx-project-registry.txt'
--- lib/lp/registry/stories/webservice/xx-project-registry.txt 2010-11-22 21:36:21 +0000
+++ lib/lp/registry/stories/webservice/xx-project-registry.txt 2011-01-17 22:09:44 +0000
@@ -1112,7 +1112,7 @@
>>> print result
HTTP/1.1 303 See Other
...
- Location: http://localhost:58000/.../firefox_0.9.2.orig.tar.gz
+ Location: http://.../firefox_0.9.2.orig.tar.gz
...
The signature file will redirect too, if found. In this case there is
@@ -1207,7 +1207,7 @@
>>> print result
HTTP/1.1 303 See Other
...
- Location: http://localhost:58000/.../filename.txt
+ Location: http://.../filename.txt
...
Project release files can be deleted using the 'delete' method. The
=== modified file 'lib/lp/registry/tests/test_distroseriesdifference.py'
--- lib/lp/registry/tests/test_distroseriesdifference.py 2010-10-29 19:28:14 +0000
+++ lib/lp/registry/tests/test_distroseriesdifference.py 2011-01-17 22:09:44 +0000
@@ -540,8 +540,7 @@
naked_dsdiff.parent_package_diff = self.factory.makePackageDiff()
self.assertEqual(None, ds_diff.package_diff_url)
- self.assertTrue(ds_diff.parent_package_diff_url.startswith(
- 'http://localhost:58000/'))
+ self.assertTrue(ds_diff.parent_package_diff_url is not None)
class DistroSeriesDifferenceSourceTestCase(TestCaseWithFactory):
=== modified file 'lib/lp/soyuz/doc/distroarchseries.txt'
--- lib/lp/soyuz/doc/distroarchseries.txt 2010-11-02 21:44:42 +0000
+++ lib/lp/soyuz/doc/distroarchseries.txt 2011-01-17 22:09:44 +0000
@@ -367,7 +367,7 @@
the file.
>>> print hoary.getDistroArchSeries('hppa').chroot_url
- http://localhost:58000/.../filename...
+ http://.../filename...
>>> hoary.getDistroArchSeries('hppa').chroot_url == \
... chroot.http_url
True
=== modified file 'lib/lp/soyuz/doc/soyuz-files.txt'
--- lib/lp/soyuz/doc/soyuz-files.txt 2010-10-19 18:44:31 +0000
+++ lib/lp/soyuz/doc/soyuz-files.txt 2011-01-17 22:09:44 +0000
@@ -48,7 +48,7 @@
u'firefox_0.9.2.orig.tar.gz'
>>> srcfile.libraryfile.http_url
- 'http://localhost:58000/3/firefox_0.9.2.orig.tar.gz'
+ 'http://.../3/firefox_0.9.2.orig.tar.gz'
== Binary Files ==
@@ -76,7 +76,7 @@
u'pmount_1.9-1_all.deb'
>>> debfile.libraryfile.http_url
- 'http://localhost:58000/37/pmount_1.9-1_all.deb'
+ 'http://.../37/pmount_1.9-1_all.deb'
== Utilities ==
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-files.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2011-01-12 23:07:40 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2011-01-17 22:09:44 +0000
@@ -350,14 +350,14 @@
>>> logout()
>>> print file_librarian_url
- http://localhost:58000/.../test-pkg_1.0.dsc
+ http://.../test-pkg_1.0.dsc
>>> print http(r"""
... GET %s HTTP/1.1
... """ % file_lp_url.replace('http://launchpad.dev', ''))
HTTP/1.1 303 See Other
...
- Location: http://localhost:58000/.../test-pkg_1.0.dsc
+ Location: http://.../test-pkg_1.0.dsc
...
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distro-package-pages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distro-package-pages.txt 2009-09-03 16:53:49 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distro-package-pages.txt 2011-01-17 22:09:44 +0000
@@ -47,5 +47,5 @@
... """ % path)
HTTP/1.1 303 See Other
...
- Location: http://localhost:58000/68/commercialpackage_1.0-1.dsc
+ Location: http://.../68/commercialpackage_1.0-1.dsc
...
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt 2009-12-11 15:27:08 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt 2011-01-17 22:09:44 +0000
@@ -107,7 +107,7 @@
>>> dfiles_element = find_tag_by_id(
... browser.contents, 'downloadable-files')
>>> print dfiles_element.find(name='a')['href']
- http://localhost:58000/40/mozilla-firefox_0.9_i386.deb
+ http://.../40/mozilla-firefox_0.9_i386.deb
If the binary package did produce files, but those files have been
subsequently deleted, this will also be indicated and the file will
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2010-11-11 21:48:20 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2011-01-17 22:09:44 +0000
@@ -387,7 +387,7 @@
With the possibility to download the entire changesfile (if available):
>>> print browser.getLink('View changes file').url
- http://localhost:58000/65/commercialpackage_1.0-1_source.changes
+ http://.../65/commercialpackage_1.0-1_source.changes
And also download the files contained in this source, like '.orig',
'.diff' and the DSC:
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-queue-pages-delayed-copies.txt'
--- lib/lp/soyuz/stories/soyuz/xx-queue-pages-delayed-copies.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-queue-pages-delayed-copies.txt 2011-01-17 22:09:44 +0000
@@ -122,7 +122,7 @@
>>> anon_browser.getControl("Update").click()
>>> print anon_browser.getLink('foo, foo').url
- http://localhost:58000/.../foo_666_source.changes
+ http://.../.../foo_666_source.changes
>>> extra_information = find_tags_by_class(
... anon_browser.contents, 'queue-%s' % delayed_copy.id)
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt 2011-01-17 22:09:28 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt 2011-01-17 22:09:44 +0000
@@ -229,11 +229,11 @@
>>> for row in filelist:
... print row.find('a')
- <a href="http://localhost:58000/.../alsa-utils_1.0.9a-4ubuntu1.dsc">
+ <a href="http://.../alsa-utils_1.0.9a-4ubuntu1.dsc">
alsa-utils_1.0.9a-4ubuntu1.dsc
</a>
None
- <a href="http://localhost:58000/.../alsa-utils.diff.gz">diff from 1.0.9a-4 to 1.0.9a-4ubuntu1</a>
+ <a href="http://.../alsa-utils.diff.gz">diff from 1.0.9a-4 to 1.0.9a-4ubuntu1</a>
On binary queue items we also present the stamp 'NEW' for files never
published in the archive (it helps archive admins when reviewing
=== modified file 'lib/lp/soyuz/tests/test_publishing_models.py'
--- lib/lp/soyuz/tests/test_publishing_models.py 2010-10-04 19:50:45 +0000
+++ lib/lp/soyuz/tests/test_publishing_models.py 2011-01-17 22:09:44 +0000
@@ -82,9 +82,7 @@
self.publishing_set.getChangesFileLFA(hist.sourcepackagerelease)
for hist in self.sources)
urls = [lfa.http_url for lfa in lfas]
- self.assertEqual(urls, [
- 'http://localhost:58000/94/gedit_666_source.changes',
- 'http://localhost:58000/96/firefox_666_source.changes',
- ('http://localhost:58000/98/'
- 'getting-things-gnome_666_source.changes'),
- ])
+ self.assert_(urls[0].endswith('/94/gedit_666_source.changes'))
+ self.assert_(urls[1].endswith('/96/firefox_666_source.changes'))
+ self.assert_(urls[2].endswith(
+ '/98/getting-things-gnome_666_source.changes'))
=== modified file 'lib/lp/testing/__init__.py'
--- lib/lp/testing/__init__.py 2011-01-17 22:09:28 +0000
+++ lib/lp/testing/__init__.py 2011-01-17 22:09:44 +0000
@@ -512,13 +512,8 @@
"""Include the logChunks from fixture in the test details."""
# Evaluate the log when called, not later, to permit the librarian to
# be shutdown before the detail is rendered.
-<<<<<<< TREE
chunks = fixture.logChunks()
content = Content(UTF8_TEXT, lambda: chunks)
-=======
- chunks = fixture.getLogChunks()
- content = Content(UTF8_TEXT, lambda:chunks)
->>>>>>> MERGE-SOURCE
self.addDetail('librarian-log', content)
def setUp(self):
=== modified file 'lib/lp/translations/doc/poexport-queue.txt'
--- lib/lp/translations/doc/poexport-queue.txt 2011-01-13 18:09:48 +0000
+++ lib/lp/translations/doc/poexport-queue.txt 2011-01-17 22:09:44 +0000
@@ -304,7 +304,7 @@
The translation files you requested from Launchpad are ready for
download from the following location:
<BLANKLINE>
- http://localhost:58000/.../po_evolution-2.2.pot
+ http://.../.../po_evolution-2.2.pot
<BLANKLINE>
Note: this link will expire in about 1 week. If you want to
download these translations again, you will have to request
=== modified file 'lib/lp/translations/doc/poexport-request-productseries.txt'
--- lib/lp/translations/doc/poexport-request-productseries.txt 2010-12-22 20:46:21 +0000
+++ lib/lp/translations/doc/poexport-request-productseries.txt 2011-01-17 22:09:44 +0000
@@ -60,7 +60,7 @@
The translation files you requested from Launchpad are ready for
download from the following location:
<BLANKLINE>
- http://localhost:58000/.../launchpad-export.tar.gz
+ http://.../launchpad-export.tar.gz
<BLANKLINE>
Note: this link will expire in about 1 week. If you want to
download these translations again, you will have to request
=== modified file 'lib/lp/translations/doc/poexport-request.txt'
--- lib/lp/translations/doc/poexport-request.txt 2010-12-22 20:46:21 +0000
+++ lib/lp/translations/doc/poexport-request.txt 2011-01-17 22:09:44 +0000
@@ -62,7 +62,7 @@
The translation files you requested from Launchpad are ready for
download from the following location:
<BLANKLINE>
- http://localhost:58000/.../launchpad-export.tar.gz
+ http://.../launchpad-export.tar.gz
<BLANKLINE>
Note: this link will expire in about 1 week. If you want to
download these translations again, you will have to request
@@ -194,7 +194,7 @@
The translation files you requested from Launchpad are ready for
download from the following location:
<BLANKLINE>
- http://localhost:58000/.../cs_LC_MESSAGES_pmount.mo
+ http://.../cs_LC_MESSAGES_pmount.mo
<BLANKLINE>
Note: this link will expire in about 1 week. If you want to
download these translations again, you will have to request
=== modified file 'lib/lp/translations/doc/poimport-pofile-not-exported-from-rosetta.txt'
--- lib/lp/translations/doc/poimport-pofile-not-exported-from-rosetta.txt 2010-12-02 16:13:51 +0000
+++ lib/lp/translations/doc/poimport-pofile-not-exported-from-rosetta.txt 2011-01-17 22:09:44 +0000
@@ -118,7 +118,7 @@
apply your changes and upload the merged file.
<BLANKLINE>
For your convenience, you can get the file you uploaded at:
- http://localhost:58000/.../firefox-cy.po
+ http://.../firefox-cy.po
<BLANKLINE>
Thank you,
<BLANKLINE>
=== modified file 'lib/lp/translations/doc/poimport-pofile-old-po-imported.txt'
--- lib/lp/translations/doc/poimport-pofile-old-po-imported.txt 2010-12-02 16:13:51 +0000
+++ lib/lp/translations/doc/poimport-pofile-old-po-imported.txt 2011-01-17 22:09:44 +0000
@@ -177,7 +177,7 @@
'PO-Revision-Date' field updated.
<BLANKLINE>
For your convenience, you can get the file you uploaded at:
- http://localhost:58000/.../firefox-cy.po
+ http://.../firefox-cy.po
<BLANKLINE>
Thank you,
<BLANKLINE>
=== modified file 'lib/lp/translations/doc/poimport-pofile-syntax-error.txt'
--- lib/lp/translations/doc/poimport-pofile-syntax-error.txt 2010-12-02 16:13:51 +0000
+++ lib/lp/translations/doc/poimport-pofile-syntax-error.txt 2011-01-17 22:09:44 +0000
@@ -113,7 +113,7 @@
answer or file a question at https://answers.launchpad.net/rosetta/
<BLANKLINE>
For your convenience, you can get the file you uploaded at:
- http://localhost:58000/.../firefox-cy.po
+ http://.../firefox-cy.po
<BLANKLINE>
Thank you,
<BLANKLINE>
=== modified file 'lib/lp/translations/doc/poimport-potemplate-syntax-error.txt'
--- lib/lp/translations/doc/poimport-potemplate-syntax-error.txt 2010-12-02 16:13:51 +0000
+++ lib/lp/translations/doc/poimport-potemplate-syntax-error.txt 2011-01-17 22:09:44 +0000
@@ -94,7 +94,7 @@
answer or file a question at https://answers.launchpad.net/rosetta/
<BLANKLINE>
For your convenience, you can get the file you uploaded at:
- http://localhost:58000/.../firefox.pot
+ http://.../firefox.pot
<BLANKLINE>
Thank you,
<BLANKLINE>
@@ -151,7 +151,7 @@
'ascii' codec can't decode byte ...
<BLANKLINE>
For your convenience, you can find the file you uploaded at:
- http://localhost:58000/.../nonascii.pot
+ http://.../nonascii.pot
<BLANKLINE>
Thank you,
<BLANKLINE>
=== modified file 'lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt'
--- lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt 2009-09-14 19:00:45 +0000
+++ lib/lp/translations/stories/standalone/xx-translations-xpi-import.txt 2011-01-17 22:09:44 +0000
@@ -36,7 +36,7 @@
>>> browser.getLink('Translation Import Queue').click()
>>> print browser.getLink(url='en-US.xpi').url
- http://localhost:58000/.../en-US.xpi
+ http://.../en-US.xpi
>>> browser.getLink(url='imports/3').click()
>>> print browser.url
http://translations.launchpad.dev/+imports/3