[tests-only] full-ci] Fix path calculation in listTrashbinFolderCollection #40037
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
listTrashbinFolderCollection
Before this change, when
$collectionPath
was empty, the code would end up with 2/
on the end for the comparison with$element['href']
. It would try to match a string like/remote.php/dav/trash-bin/Alice//
- and that would never match. That caused the top-level trash-bin root itself to end up in the list of items in the trash-bin for consideration by later steps.Later code was then trying to traverse down into an invalid trashbin "folder" like
/remote.php/dav/trash-bin/Alice/Alice/
which is an incorrect thing to even try to do (and looks like it might be part of the cause of trouble when running against oCIS)When doing a PROPFIND to the root of the empty trashbin in oC10, you get a response like:
But on oCIS the response is like:
The "href" is missing the username at the end of the string
/remote.php/dav/trash-bin/
- it should be something like/remote.php/dav/trash-bin/Alice/
.And that creates a problem for any client code that tries to use the "href" value.
How Has This Been Tested?
CI and local test runs.
oCIS CI is tested in owncloud/ocis#3638 - that gets the regular trashbin test scenarios passing like they previously did. There are other issues with using the spaces endpoint and trying to access the trashbin - those are a separate thing.
https://drone.owncloud.com/owncloud/ocis/11191/31/6
The test code works-around the problem, and actually the rest of the test passes. We can see in the log output that the problem is there, so that will help when fixing it. After it is fixed in reva and oCIS we then need to go back and remove the work-around from the test code. I would rather do this than have every trashbin test scenario added to expected-failures because of this newly-discovered problem.
Types of changes
Checklist: