Skip to content

Conversation

@ScharfViktor
Copy link
Contributor

fix #2146

Sometimes after moving folder it still be visible for a short time.

When user "Alice" moves folder "folderB" to "folderA/folderB" using the WebDAV API - ✅️ 201
		_______________________________________________________________________

		==> REQUEST
		MOVE /remote.php/webdav/folderB
		X-Request-ID: coreApiShareManagementToShares/moveShareInsideAnotherShare.feature:60-50

		<== RESPONSE
		201 Created
		X-Xss-Protection: 1; mode=block
### Then the HTTP status code should be "201"
### And as "Alice" folder "/folderB" should not exist
		_______________________________________________________________________

		==> REQUEST
		PROPFIND /remote.php/webdav/folderB
		X-Request-ID: coreApiShareManagementToShares/moveShareInsideAnotherShare.feature:60-52
		==> REQ BODY
		<?xml version="1.0"?>
				<d:propfind
				   xmlns:d="DAV:"
				   xmlns:oc="[http://owncloud.org/ns"](http://owncloud.org/ns%22)
				   xmlns:ocs="[http://open-collaboration-services.org/ns"](http://open-collaboration-services.org/ns%22)
				   >
				    <d:prop><d:getetag/><d:resourcetype/></d:prop>
				</d:propfind>

		<== RESPONSE
		207 Multi-Status
		X-Xss-Protection: 1; mode=block
		<== RES BODY
		<d:multistatus xmlns:s="[http://sabredav.org/ns"](http://sabredav.org/ns%22) xmlns:d="DAV:" xmlns:oc="[http://owncloud.org/ns"><d:response><d:href>/remote.php/webdav/folderB/</d:href><d:propstat><d:prop><d:getetag>"30cb468040e85593a018bad164810beb"</d:getetag><d:resourcetype><d:collection/></d:resourcetype>

Solution: if the folder still exists (207 status code), wait 1 second and retry the PROPFIND request once

Copy link
Contributor

@rhafer rhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes after moving folder it still be visible for a short time.

Oh, that sounds like a bug we should rather fix in the code and not add workarounds in the tests for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky test: coreApiShareManagementToShares/moveShareInsideAnotherShare.feature:60

3 participants