From 60816a2e4a9cb2b1906c07abcb80079aa21ce37a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 21 Jun 2018 16:00:58 +0200 Subject: [PATCH] use DAV instead of SMB for deletion tests SMB storages can't be constructed on drone because of missing dependencies Signed-off-by: Robin Appelman --- .../files_external/tests/Service/StoragesServiceTest.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php index b875bcb55e..44fa6c31b7 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTest.php @@ -134,6 +134,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { $sftpBackend = $this->getBackendMock('\OCA\Files_External\Lib\Backend\SFTP', '\OCA\Files_External\Lib\Storage\SFTP'); $backends = [ + 'identifier:\OCA\Files_External\Lib\Backend\DAV' => $this->getBackendMock('\OCA\Files_External\Lib\Backend\DAV', '\OC\Files\Storage\DAV'), 'identifier:\OCA\Files_External\Lib\Backend\SMB' => $this->getBackendMock('\OCA\Files_External\Lib\Backend\SMB', '\OCA\Files_External\Lib\Storage\SMB'), 'identifier:\OCA\Files_External\Lib\Backend\SFTP' => $sftpBackend, 'identifier:sftp_alias' => $sftpBackend, @@ -269,25 +270,23 @@ abstract class StoragesServiceTest extends \Test\TestCase { // regular case, can properly delete the oc_storages entry [ [ - 'share' => 'share', 'host' => 'example.com', 'user' => 'test', 'password' => 'testPassword', 'root' => 'someroot', ], - 'smb::test@example.com//share//someroot/', + 'webdav::test@example.com//someroot/', 0 ], // special case with $user vars, cannot auto-remove the oc_storages entry [ [ - 'share' => 'share', 'host' => 'example.com', 'user' => '$user', 'password' => 'testPassword', 'root' => 'someroot', ], - 'smb::someone@example.com//share//someroot/', + 'webdav::someone@example.com//someroot/', 1 ], ]; @@ -297,7 +296,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { * @dataProvider deleteStorageDataProvider */ public function testDeleteStorage($backendOptions, $rustyStorageId, $expectedCountAfterDeletion) { - $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); + $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\DAV'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); $storage = new StorageConfig(255); $storage->setMountPoint('mountpoint');