Merge lp:~cjwatson/launchpad/queue-copy-archive-links-testfix into lp:launchpad

Proposed by Colin Watson
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 16571
Proposed branch: lp:~cjwatson/launchpad/queue-copy-archive-links-testfix
Merge into: lp:launchpad
Diff against target: 78 lines (+10/-17)
3 files modified
lib/lp/app/browser/tales.py (+6/-14)
lib/lp/soyuz/stories/soyuz/xx-build-record.txt (+3/-3)
lib/lp/soyuz/stories/webservice/xx-packageupload.txt (+1/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad/queue-copy-archive-links-testfix
Reviewer Review Type Date Requested Status
Steve Kowalik (community) code Approve
Review via email: mp+159442@code.launchpad.net

Commit message

Fix queue-copy-archive-links test failures.

Description of the change

Fixes for buildbot failures caused by https://code.launchpad.net/~cjwatson/launchpad/queue-copy-archive-links/+merge/159250, missed in EC2 test attempt.

bin/test -vvct lib/lp/app/doc/tales.txt -t lp.soyuz.browser.tests.test_queue -t lp.soyuz.tests.test_packageupload -t lp.testing.tests.test_factory -t lib/lp/soyuz/stories/soyuz/xx-build-record.txt -t lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt -t lib/lp/soyuz/stories/webservice/xx-packageupload.txt

To post a comment you must log in.
Revision history for this message
Steve Kowalik (stevenk) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/app/browser/tales.py'
--- lib/lp/app/browser/tales.py 2013-04-17 10:51:39 +0000
+++ lib/lp/app/browser/tales.py 2013-04-17 16:49:29 +0000
@@ -1864,19 +1864,6 @@
1864 final_traversable_names.update(1864 final_traversable_names.update(
1865 CustomizableFormatter.final_traversable_names)1865 CustomizableFormatter.final_traversable_names)
18661866
1867 def url(self, view_name=None, rootsite='mainsite'):
1868 """See `ObjectFormatterAPI`.
1869
1870 The default URL for a distribution main archive is the URL of the
1871 distribution. Other archive URLs are constructed as normal.
1872 """
1873 if self._context.is_main:
1874 return queryAdapter(
1875 self._context.distribution, IPathAdapter, 'fmt').url(
1876 view_name, rootsite)
1877 else:
1878 return super(ArchiveFormatterAPI, self).url(view_name, rootsite)
1879
1880 def _link_summary_values(self):1867 def _link_summary_values(self):
1881 """See CustomizableFormatter._link_summary_values."""1868 """See CustomizableFormatter._link_summary_values."""
1882 return {'display_name': self._context.displayname}1869 return {'display_name': self._context.displayname}
@@ -1895,7 +1882,12 @@
1895 summary = self._make_link_summary()1882 summary = self._make_link_summary()
1896 css = self.sprite_css()1883 css = self.sprite_css()
1897 if check_permission(self._link_permission, self._context):1884 if check_permission(self._link_permission, self._context):
1898 url = self.url(view_name)1885 if self._context.is_main:
1886 url = queryAdapter(
1887 self._context.distribution, IPathAdapter, 'fmt').url(
1888 view_name)
1889 else:
1890 url = self.url(view_name)
1899 return '<a href="%s" class="%s">%s</a>' % (url, css, summary)1891 return '<a href="%s" class="%s">%s</a>' % (url, css, summary)
1900 else:1892 else:
1901 if not self._context.private:1893 if not self._context.private:
19021894
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2013-01-22 02:06:59 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2013-04-17 16:49:29 +0000
@@ -98,7 +98,7 @@
98 Pocket: Release98 Pocket: Release
99 Component: main99 Component: main
100100
101Re-enable the build in order to avioid subsequent test breakage.101Re-enable the build in order to avoid subsequent test breakage.
102102
103 >>> login('foo.bar@canonical.com')103 >>> login('foo.bar@canonical.com')
104 >>> build.buildqueue_record.job.resume()104 >>> build.buildqueue_record.job.resume()
@@ -106,13 +106,13 @@
106 >>> anon_browser.open(build_url)106 >>> anon_browser.open(build_url)
107107
108The 'Build details' section exists for all status and contains links108The 'Build details' section exists for all status and contains links
109to all the relevant entities involed in this build.109to all the relevant entities involved in this build.
110110
111 >>> print anon_browser.getLink('testing - 1.0').url111 >>> print anon_browser.getLink('testing - 1.0').url
112 http://launchpad.dev/ubuntutest/+source/testing/1.0112 http://launchpad.dev/ubuntutest/+source/testing/1.0
113113
114 >>> print anon_browser.getLink('Primary Archive for Ubuntu Test').url114 >>> print anon_browser.getLink('Primary Archive for Ubuntu Test').url
115 http://launchpad.dev/ubuntutest/+archive/primary115 http://launchpad.dev/ubuntutest
116116
117 >>> print anon_browser.getLink('Breezy Badger Autotest').url117 >>> print anon_browser.getLink('Breezy Badger Autotest').url
118 http://launchpad.dev/ubuntutest/breezy-autotest118 http://launchpad.dev/ubuntutest/breezy-autotest
119119
=== modified file 'lib/lp/soyuz/stories/webservice/xx-packageupload.txt'
--- lib/lp/soyuz/stories/webservice/xx-packageupload.txt 2012-07-02 16:04:09 +0000
+++ lib/lp/soyuz/stories/webservice/xx-packageupload.txt 2013-04-17 16:49:29 +0000
@@ -19,6 +19,7 @@
19 >>> from lazr.restful.testing.webservice import pprint_entry19 >>> from lazr.restful.testing.webservice import pprint_entry
20 >>> pprint_entry(uploads['entries'][0])20 >>> pprint_entry(uploads['entries'][0])
21 archive_link: u'http://.../ubuntu/+archive/primary'21 archive_link: u'http://.../ubuntu/+archive/primary'
22 copy_source_archive_link: None
22 custom_file_urls: []23 custom_file_urls: []
23 date_created: ...24 date_created: ...
24 display_arches: u'source'25 display_arches: u'source'