summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-09-28 16:38:01 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-10-06 16:27:25 +0200
commit5646e39248d9ac2bade491dc99c88a10b3dfbc34 (patch)
treea330a10aa0979d00b3449205c95cf484af6d03b2 /apps/files_sharing
parentbb4246c9a8dc40d844ad94492cb40ece5bd35ef6 (diff)
downloadnextcloud-server-5646e39248d9ac2bade491dc99c88a10b3dfbc34.tar.gz
nextcloud-server-5646e39248d9ac2bade491dc99c88a10b3dfbc34.zip
test objectstore with ceph docker
use default config for swift primary storage test config allow testsuite to complete fix timeout, script cleanup, enable debug for now use btrfs loopback device, requires privileged container and absolute path throw exception when storage has problems debug by echo ... sleep more, more debug
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/tests/etagpropagation.php6
-rw-r--r--apps/files_sharing/tests/sizepropagation.php2
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/etagpropagation.php b/apps/files_sharing/tests/etagpropagation.php
index 6d23959d66d..35c7012a753 100644
--- a/apps/files_sharing/tests/etagpropagation.php
+++ b/apps/files_sharing/tests/etagpropagation.php
@@ -74,11 +74,14 @@ class EtagPropagation extends TestCase {
$view1->file_put_contents('/sub1/sub2/folder/file.txt', 'foobar');
$view1->file_put_contents('/sub1/sub2/folder/inside/file.txt', 'foobar');
$folderInfo = $view1->getFileInfo('/sub1/sub2/folder');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo);
$fileInfo = $view1->getFileInfo('/foo.txt');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
\OCP\Share::shareItem('file', $fileInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31);
\OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31);
\OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER3, 31);
$folderInfo = $view1->getFileInfo('/directReshare');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo);
\OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31);
$this->fileIds[self::TEST_FILES_SHARING_API_USER1][''] = $view1->getFileInfo('')->getId();
$this->fileIds[self::TEST_FILES_SHARING_API_USER1]['sub1'] = $view1->getFileInfo('sub1')->getId();
@@ -89,8 +92,10 @@ class EtagPropagation extends TestCase {
$view2->mkdir('/sub1/sub2');
$view2->rename('/folder', '/sub1/sub2/folder');
$insideInfo = $view2->getFileInfo('/sub1/sub2/folder/inside');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $insideInfo);
\OCP\Share::shareItem('folder', $insideInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER4, 31);
$folderInfo = $view2->getFileInfo('/directReshare');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo);
\OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER4, 31);
$this->fileIds[self::TEST_FILES_SHARING_API_USER2][''] = $view2->getFileInfo('')->getId();
$this->fileIds[self::TEST_FILES_SHARING_API_USER2]['sub1'] = $view2->getFileInfo('sub1')->getId();
@@ -260,6 +265,7 @@ class EtagPropagation extends TestCase {
public function testOwnerUnshares() {
$this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
$folderInfo = $this->rootView->getFileInfo('/' . self::TEST_FILES_SHARING_API_USER1 . '/files/sub1/sub2/folder');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo);
$folderId = $folderInfo->getId();
$this->assertTrue(
\OCP\Share::unshare(
diff --git a/apps/files_sharing/tests/sizepropagation.php b/apps/files_sharing/tests/sizepropagation.php
index f46d5a5a7ad..c596003de76 100644
--- a/apps/files_sharing/tests/sizepropagation.php
+++ b/apps/files_sharing/tests/sizepropagation.php
@@ -35,6 +35,7 @@ class SizePropagation extends TestCase {
$ownerView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'bar');
$sharedFolderInfo = $ownerView->getFileInfo('/sharedfolder', false);
+ $this->assertInstanceOf('\OC\Files\FileInfo', $sharedFolderInfo);
\OCP\Share::shareItem('folder', $sharedFolderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER1, 31);
$ownerRootInfo = $ownerView->getFileInfo('', false);
@@ -67,6 +68,7 @@ class SizePropagation extends TestCase {
$ownerView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'bar');
$sharedFolderInfo = $ownerView->getFileInfo('/sharedfolder', false);
+ $this->assertInstanceOf('\OC\Files\FileInfo', $sharedFolderInfo);
\OCP\Share::shareItem('folder', $sharedFolderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER1, 31);
$ownerRootInfo = $ownerView->getFileInfo('', false);