diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-08-03 17:33:12 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-08-04 14:05:41 +0200 |
commit | 78a46dcac127f3606647e339e1993f87d6b1088c (patch) | |
tree | b1ce6f1d4ae87528a482ac2ed014dd5e041099a8 /apps/files_sharing/tests | |
parent | 8c9b8f4fe9b5efa15178c78349d72f2de5c33634 (diff) | |
download | nextcloud-server-78a46dcac127f3606647e339e1993f87d6b1088c.tar.gz nextcloud-server-78a46dcac127f3606647e339e1993f87d6b1088c.zip |
fix infinite loops with propagating etags on reshares
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/etagpropagation.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/apps/files_sharing/tests/etagpropagation.php b/apps/files_sharing/tests/etagpropagation.php index d978daf200c..8da4e6f29bd 100644 --- a/apps/files_sharing/tests/etagpropagation.php +++ b/apps/files_sharing/tests/etagpropagation.php @@ -266,15 +266,15 @@ class EtagPropagation extends TestCase { \OCP\Share::unshare( 'folder', $folderId, - \OCP\Share::SHARE_TYPE_USER, + \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2 ) ); $this->assertEtagsForFoldersChanged([ // direct recipient affected - self::TEST_FILES_SHARING_API_USER2, + self::TEST_FILES_SHARING_API_USER2, // reshare recipient affected - self::TEST_FILES_SHARING_API_USER4, + self::TEST_FILES_SHARING_API_USER4, ]); $this->assertAllUnchaged(); @@ -287,9 +287,9 @@ class EtagPropagation extends TestCase { ); $this->assertEtagsForFoldersChanged([ // direct recipient affected - self::TEST_FILES_SHARING_API_USER2, + self::TEST_FILES_SHARING_API_USER2, // reshare recipient affected - self::TEST_FILES_SHARING_API_USER4, + self::TEST_FILES_SHARING_API_USER4, ]); $this->assertAllUnchaged(); @@ -398,4 +398,13 @@ class EtagPropagation extends TestCase { $this->assertAllUnchaged(); } + + public function testRecipientUploadInDirectReshare() { + $this->loginAsUser(self::TEST_FILES_SHARING_API_USER2); + Filesystem::file_put_contents('/directReshare/test.txt', 'sad'); + $this->assertEtagsNotChanged([self::TEST_FILES_SHARING_API_USER3]); + $this->assertEtagsChanged([self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, self::TEST_FILES_SHARING_API_USER4]); + + $this->assertAllUnchaged(); + } } |