Pagetests cannot access external resources

Bug #113083 reported by Brad Crittenden
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Won't Fix
Medium
Unassigned

Bug Description

Pagetests that attempt to access files served by the Librarian result in a 404 "File Not Found" error. This is due to zope.testbrowser serving files by making method calls to the zope publisher, not really using HTTP to contact the server. As a result, attempts to access files that are served by external servers, such as the Librarian, fail.

One solution is to change the test environment to use a subclass of zope.testbrowser that would be able to correctly make external requests for librarian files and discard other external requests.

When this bug is fixed pagetests/product/xx-product-files.txt should be updated to remove the work-around code and access Librarian files directly.

Thanks to flacoste for helping to determine the problem and explaining it clearly.

Changed in launchpad:
importance: Undecided → Medium
status: New → Triaged
summary: - Pagetests cannot access librarian files
+ Pagetests cannot access external resources
Revision history for this message
Robert Collins (lifeless) wrote :

Another possibility, for the librarian case is the inprocess librarian jtv put together.

Revision history for this message
Robert Collins (lifeless) wrote :

Actually on consideration, won'tfixing this: pagetests can mock out the things they need, or use real clients when they are not testing LP itself - having the LP itself testbrowser know a-priori which is which looks complex to me - and that sort of test where we're doing end to end integration is best done in gary's new layer or similar tests.

Changed in launchpad:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.