Description
This is currently the last failing test on Jenkins for the main Plone 5.2 job. This fails:
File ".../Products/CMFPlone/tests/testResourceRegistries.py", line 174, in test_cooking_missing
self.assertTrue('Could not find resource' in resp.getBody())
So that is this line in the test. It expects that cooking a non existing resource leads to a response with 'Could not find resource' in the body.
It fails because of some code in cook.py. That code uses subrequest
to get this non existing resource '++plone++static/foobar.js'
. The result of that subrequest is a response with status 200 and a body {"error_type": "NotFound"}
.
What apparently used to happen is that the response had a different status code (presumably 404) and then you end up in the part of the code that adds the expected 'Could not find resource' in the response.
Quick workaround would be to change the test to expect 'NotFound' in the body text. But the question remains: has something changed in subrequest
or Zope
or elsewhere to no longer give a 404 here? For our use case here it seems not so bad, but other code using subrequests may be tripped up when they get a 200 status for a javascript file that is not found.
Activity