[tests-only] Allow 400 bad request for requests to meta endpoint that do not request meta-path-for-user #40010
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There are various test scenarios that check invalid/unauthorised attempts to access
remote.php/dav/meta
API endpoints.The tests just send a PROPFIND directly to the endpoint, without specifying any request body that mentions
oc:meta-path-for-user
. The documentation https://doc.owncloud.com/server/next/developer_manual/webdav_api/meta.html#meta-files-xml does not mention exactly what should happen if the body is empty.oC10 returns 404 "not found". But it is also reasonable for an implementation to return 400 "bad request" (and requires that the request has a "proper" XML body in the PROPFIND request.
This PR adjusts the tests so that they will accept either 400 or 404 as the HTTP status of these requests. This will help the tests to pass with reva and oCIS. In particular, see cs3org/reva#2741
How Has This Been Tested?
CI
Types of changes
Checklist: