Merge lp:~jml/launchpad/xx-service-txt into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Jonathan Lange |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11955 |
Proposed branch: | lp:~jml/launchpad/xx-service-txt |
Merge into: | lp:launchpad |
Diff against target: |
19 lines (+0/-10) 1 file modified
lib/canonical/launchpad/pagetests/webservice/xx-service.txt (+0/-10) |
To merge this branch: | bzr merge lp:~jml/launchpad/xx-service-txt |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email: mp+41392@code.launchpad.net |
Description of the change
The branch fixes a failure in lp:launchpad/devel.
Failure in test lib/canonical/
Traceback (most recent call last):
File "/usr/lib/
testMethod()
File "/usr/lib/
raise self.failureExc
AssertionError: Failed doctest test for xx-service.txt
File "lib/canonical/
-------
File "lib/canonical/
Failed example:
print webservice.
Differences (ndiff with -expected +actual):
- HTTP/1.1 404 Not Found
- ...
+ HTTP/1.1 200 Ok
+ Status: 200 Ok
+ Content-Length: 1223
+ Content-Type: application/json
+ Vary: Accept
+ X-Powered-By: Zope (www.zope.org), Python (www.python.org)
+ <BLANKLINE>
+ {"total_size": 2, "start": 0, "entries": [{"description": "The default build-slave", "title": "Bob The Builder", "url": "http://
To fix the failure, I have just deleted the test. Testing that a non-exposed web service 404s seems like it might be appropriate for a unit test, but this clearly is not. It might be appropriate as documentation, but I don't see how any user of the webservice will find xx-service.txt, or why any creator of the webservice would consult it.
If it is a critical lynch-pin of our webservice testing strategy, then I'm happy to see it restored, but in some way that is robust against new bits of Launchpad being exposed.
Creating the MP for post-hoc reviews.
I think the test is trying to say 'things must be explicitly added to
the web service'. A good replacement would be to create a new top
level collection on the fly with a unique name, and check that works
on browsers not on apis. I think that that can wait though.