diff --git a/api/tests/Vfs/SharingBase.php b/api/tests/Vfs/SharingBase.php index 98c6c622a2..1e698164f2 100644 --- a/api/tests/Vfs/SharingBase.php +++ b/api/tests/Vfs/SharingBase.php @@ -267,9 +267,16 @@ class SharingBase extends LoggedInTest // Vfs breaks if path has trailing / if(substr($path, -1) == '/') $path = substr($path, 0, -1); + $backup = Vfs::$is_root; Vfs::$is_root = true; - $url = \EGroupware\Stylite\Vfs\Merge\StreamWrapper::SCHEME.'://default'.$path.'?merge=api/tests/fixtures/Vfs/filesystem_mount'; + + // I guess merge needs the dir in SQLFS first + Vfs::mkdir($path); + Vfs::chmod($path, 0750); + Vfs::chown($path, $GLOBALS['egw_info']['user']['account_id']); + + $url = \EGroupware\Stylite\Vfs\Merge\StreamWrapper::SCHEME.'://default'.$path.'?merge=' . realpath(__DIR__ . '/../fixtures/Vfs/filesystem_mount'); $this->assertTrue(Vfs::mount($url,$path), "Unable to mount $url to $path"); Vfs::$is_root = $backup; @@ -316,6 +323,7 @@ class SharingBase extends LoggedInTest ); // Symlinked file + /* // Always says its empty $files[] = $symlink = $path.'symlink.txt'; if(Vfs::file_exists($symlink)) Vfs::remove($symlink); diff --git a/api/tests/Vfs/SharingTest.php b/api/tests/Vfs/SharingTest.php index 774c929ea8..4ddf0bcd6d 100644 --- a/api/tests/Vfs/SharingTest.php +++ b/api/tests/Vfs/SharingTest.php @@ -17,10 +17,10 @@ namespace EGroupware\Api\Vfs; -use EGroupware\Api; +require_once __DIR__ . '/SharingBase.php'; + use EGroupware\Api\Vfs; use EGroupware\Api\LoggedInTest as LoggedInTest; -use EGroupware\Stylite\Vfs\Versioning; class SharingTest extends SharingBase @@ -62,54 +62,6 @@ class SharingTest extends SharingBase 'maxdepth' => 5 ); - public function setUp() - { - - } - - public function tearDown() - { - LoggedInTest::tearDownAfterClass(); - LoggedInTest::setupBeforeClass(); - - // Re-init, since they look at user, fstab, etc. - // Also, further tests that access the filesystem fail if we don't - Vfs::clearstatcache(); - Vfs::init_static(); - Vfs\StreamWrapper::init_static(); - - // Need to ask about mounts, or other tests fail - Vfs::mount(); - - $backup = Vfs::$is_root; - Vfs::$is_root = true; - - // Remove any added files (as root to limit versioning issues) - Vfs::remove($this->files); - - // Remove any mounts - foreach($this->mounts as $mount) - { - Vfs::umount($mount); - } - - // Remove any added shares - foreach($this->shares as $share) - { - Sharing::delete($share); - } - - foreach($this->entries as $entry) - { - list($callback, $params) = $entry; - call_user_func_array($callback, $params); - } - - - Vfs::$is_root = $backup; - } - - /** * Test to make sure a readonly link to home gives just readonly access, * and just to user's home