Adding more DB groups to test suits

Adding more DB groups to test suits
This commit is contained in:
Thomas Müller 2015-11-20 11:27:11 +01:00
parent e265e982bf
commit 757aa45db7
33 changed files with 210 additions and 7 deletions

View File

@ -11,6 +11,13 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
use OCP\Lock\ILockingProvider; use OCP\Lock\ILockingProvider;
/**
* Class DownloadTest
*
* @group DB
*
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
*/
class DownloadTest extends RequestTest { class DownloadTest extends RequestTest {
public function testDownload() { public function testDownload() {
$user = $this->getUniqueID(); $user = $this->getUniqueID();

View File

@ -11,6 +11,13 @@ namespace OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest;
use OC\Files\View; use OC\Files\View;
use Test\Traits\EncryptionTrait; use Test\Traits\EncryptionTrait;
/**
* Class EncryptionUploadTest
*
* @group DB
*
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
*/
class EncryptionUploadTest extends UploadTest { class EncryptionUploadTest extends UploadTest {
use EncryptionTrait; use EncryptionTrait;

View File

@ -12,6 +12,13 @@ use OC\Connector\Sabre\Exception\FileLocked;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
use OCP\Lock\ILockingProvider; use OCP\Lock\ILockingProvider;
/**
* Class UploadTest
*
* @group DB
*
* @package OCA\DAV\Tests\Unit\Connector\Sabre\RequestTest
*/
class UploadTest extends RequestTest { class UploadTest extends RequestTest {
public function testBasicUpload() { public function testBasicUpload() {
$user = $this->getUniqueID(); $user = $this->getUniqueID();

View File

@ -38,6 +38,8 @@ use OCP\Share;
use OC\URLGenerator; use OC\URLGenerator;
/** /**
* @group DB
*
* @package OCA\Files_Sharing\Controllers * @package OCA\Files_Sharing\Controllers
*/ */
class ShareControllerTest extends \Test\TestCase { class ShareControllerTest extends \Test\TestCase {

View File

@ -24,6 +24,8 @@
/** /**
* Tests for the external Storage class for remote shares. * Tests for the external Storage class for remote shares.
*
* @group DB
*/ */
class Test_Files_Sharing_External_Storage extends \Test\TestCase { class Test_Files_Sharing_External_Storage extends \Test\TestCase {

View File

@ -29,6 +29,13 @@ use Test\TestCase;
use OC\User\Manager; use OC\User\Manager;
use OCP\Files\IRootFolder; use OCP\Files\IRootFolder;
/**
* Class CleanUpTest
*
* @group DB
*
* @package OCA\Files_Trashbin\Tests\Command
*/
class CleanUpTest extends TestCase { class CleanUpTest extends TestCase {
/** @var CleanUp */ /** @var CleanUp */

View File

@ -27,6 +27,13 @@ namespace OCA\Files_trashbin\Tests\Storage;
use OC\Files\Storage\Temporary; use OC\Files\Storage\Temporary;
use OC\Files\Filesystem; use OC\Files\Filesystem;
/**
* Class Storage
*
* @group DB
*
* @package OCA\Files_trashbin\Tests\Storage
*/
class Storage extends \Test\TestCase { class Storage extends \Test\TestCase {
/** /**
* @var string * @var string

View File

@ -29,6 +29,8 @@ use OCA\Files_Trashbin;
/** /**
* Class Test_Encryption * Class Test_Encryption
*
* @group DB
*/ */
class Test_Trashbin extends \Test\TestCase { class Test_Trashbin extends \Test\TestCase {

View File

@ -34,6 +34,8 @@ use OC\Files\Storage\Temporary;
/** /**
* Class Test_Files_versions * Class Test_Files_versions
* this class provide basic files versions test * this class provide basic files versions test
*
* @group DB
*/ */
class Test_Files_Versioning extends \Test\TestCase { class Test_Files_Versioning extends \Test\TestCase {

View File

@ -23,15 +23,35 @@
*/ */
namespace OCA\Provisioning_API\Tests; namespace OCA\Provisioning_API\Tests;
use OCA\Provisioning_API\Apps;
use OCP\API;
use OCP\App\IAppManager;
use OCP\IUserSession;
/**
* Class AppsTest
*
* @group DB
*
* @package OCA\Provisioning_API\Tests
*/
class AppsTest extends TestCase { class AppsTest extends TestCase {
/** @var IAppManager */
private $appManager;
/** @var Apps */
private $api;
/** @var IUserSession */
private $userSession;
public function setup() { public function setup() {
parent::setup(); parent::setup();
$this->appManager = \OC::$server->getAppManager(); $this->appManager = \OC::$server->getAppManager();
$this->groupManager = \OC::$server->getGroupManager(); $this->groupManager = \OC::$server->getGroupManager();
$this->userSession = \OC::$server->getUserSession(); $this->userSession = \OC::$server->getUserSession();
$this->api = new \OCA\Provisioning_API\Apps($this->appManager); $this->api = new Apps($this->appManager);
} }
public function testGetAppInfo() { public function testGetAppInfo() {
@ -46,7 +66,7 @@ class AppsTest extends TestCase {
$result = $this->api->getAppInfo(['appid' => 'not_provisioning_api']); $result = $this->api->getAppInfo(['appid' => 'not_provisioning_api']);
$this->assertInstanceOf('OC_OCS_Result', $result); $this->assertInstanceOf('OC_OCS_Result', $result);
$this->assertFalse($result->succeeded()); $this->assertFalse($result->succeeded());
$this->assertEquals(\OCP\API::RESPOND_NOT_FOUND, $result->getStatusCode()); $this->assertEquals(API::RESPOND_NOT_FOUND, $result->getStatusCode());
} }

View File

@ -23,10 +23,13 @@
namespace OCA\Provisioning_API\Tests; namespace OCA\Provisioning_API\Tests;
use OCP\IUser;
use OCP\IUserManager; use OCP\IUserManager;
use OCP\IGroupManager; use OCP\IGroupManager;
abstract class TestCase extends \Test\TestCase { abstract class TestCase extends \Test\TestCase {
/** @var IUser[] */
protected $users = array(); protected $users = array();
/** @var IUserManager */ /** @var IUserManager */
@ -46,7 +49,7 @@ abstract class TestCase extends \Test\TestCase {
/** /**
* Generates a temp user * Generates a temp user
* @param int $num number of users to generate * @param int $num number of users to generate
* @return IUser[]|Iuser * @return IUser[]|IUser
*/ */
protected function generateUsers($num = 1) { protected function generateUsers($num = 1) {
$users = array(); $users = array();

View File

@ -44,6 +44,8 @@ function is_uploaded_file($filename) {
/** /**
* Class AvatarControllerTest * Class AvatarControllerTest
* *
* @group DB
*
* @package OC\Core\Avatar * @package OC\Core\Avatar
*/ */
class AvatarControllerTest extends \Test\TestCase { class AvatarControllerTest extends \Test\TestCase {

View File

@ -30,6 +30,13 @@ use OC\Files\View;
use OCP\IUserManager; use OCP\IUserManager;
use Test\TestCase; use Test\TestCase;
/**
* Class DecryptAllTest
*
* @group DB
*
* @package Test\Encryption
*/
class DecryptAllTest extends TestCase { class DecryptAllTest extends TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject | IUserManager */ /** @var \PHPUnit_Framework_MockObject_MockObject | IUserManager */

View File

@ -10,6 +10,13 @@ namespace Test\Files\Cache\Wrapper;
use Test\Files\Cache\Cache; use Test\Files\Cache\Cache;
/**
* Class CacheJail
*
* @group DB
*
* @package Test\Files\Cache\Wrapper
*/
class CacheJail extends Cache { class CacheJail extends Cache {
/** /**
* @var \OC\Files\Cache\Cache $sourceCache * @var \OC\Files\Cache\Cache $sourceCache

View File

@ -11,6 +11,13 @@ namespace Test\Files\Cache\Wrapper;
use OCP\Constants; use OCP\Constants;
use Test\Files\Cache\Cache; use Test\Files\Cache\Cache;
/**
* Class CachePermissionsMask
*
* @group DB
*
* @package Test\Files\Cache\Wrapper
*/
class CachePermissionsMask extends Cache { class CachePermissionsMask extends Cache {
/** /**
* @var \OC\Files\Cache\Cache $sourceCache * @var \OC\Files\Cache\Cache $sourceCache

View File

@ -16,6 +16,13 @@ use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException; use OCP\Files\NotPermittedException;
use OC\Files\View; use OC\Files\View;
/**
* Class Folder
*
* @group DB
*
* @package Test\Files\Node
*/
class Folder extends \Test\TestCase { class Folder extends \Test\TestCase {
private $user; private $user;

View File

@ -17,6 +17,13 @@ use Test\TestCase;
use Test\Traits\MountProviderTrait; use Test\Traits\MountProviderTrait;
use Test\Traits\UserTrait; use Test\Traits\UserTrait;
/**
* Class HookConnector
*
* @group DB
*
* @package Test\Files\Node
*/
class HookConnector extends TestCase { class HookConnector extends TestCase {
use UserTrait; use UserTrait;
use MountProviderTrait; use MountProviderTrait;

View File

@ -22,6 +22,13 @@
namespace Test\Files\Storage; namespace Test\Files\Storage;
/**
* Class CommonTest
*
* @group DB
*
* @package Test\Files\Storage
*/
class CommonTest extends Storage { class CommonTest extends Storage {
/** /**
* @var string tmpDir * @var string tmpDir

View File

@ -36,6 +36,13 @@ class CopyDirectoryStorage extends StorageNoRecursiveCopy {
use \OC\Files\Storage\PolyFill\CopyDirectory; use \OC\Files\Storage\PolyFill\CopyDirectory;
} }
/**
* Class CopyDirectory
*
* @group DB
*
* @package Test\Files\Storage
*/
class CopyDirectory extends Storage { class CopyDirectory extends Storage {
protected function setUp() { protected function setUp() {

View File

@ -47,6 +47,13 @@ class DummyUser extends User {
} }
} }
/**
* Class Home
*
* @group DB
*
* @package Test\Files\Storage
*/
class Home extends Storage { class Home extends Storage {
/** /**
* @var string tmpDir * @var string tmpDir

View File

@ -22,6 +22,13 @@
namespace Test\Files\Storage; namespace Test\Files\Storage;
/**
* Class Local
*
* @group DB
*
* @package Test\Files\Storage
*/
class Local extends Storage { class Local extends Storage {
/** /**
* @var string tmpDir * @var string tmpDir

View File

@ -11,6 +11,13 @@ namespace Test\Files\Storage\Wrapper;
//ensure the constants are loaded //ensure the constants are loaded
\OC::$loader->load('\OC\Files\Filesystem'); \OC::$loader->load('\OC\Files\Filesystem');
/**
* Class Quota
*
* @group DB
*
* @package Test\Files\Storage\Wrapper
*/
class Quota extends \Test\Files\Storage\Storage { class Quota extends \Test\Files\Storage\Storage {
/** /**
* @var string tmpDir * @var string tmpDir

View File

@ -8,8 +8,9 @@
/** /**
* Test the storage functions of OC_Helper * Test the storage functions of OC_Helper
*
* @group DB
*/ */
class Test_Helper_Storage extends \Test\TestCase { class Test_Helper_Storage extends \Test\TestCase {
/** @var string */ /** @var string */
private $user; private $user;

View File

@ -15,6 +15,11 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/ */
/**
* Class Test_Log_Owncloud
*
* @group DB
*/
class Test_Log_Owncloud extends Test\TestCase class Test_Log_Owncloud extends Test\TestCase
{ {
private $restore_logfile; private $restore_logfile;
@ -22,8 +27,8 @@ class Test_Log_Owncloud extends Test\TestCase
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$restore_logfile = OC_Config::getValue("logfile"); $this->restore_logfile = OC_Config::getValue("logfile");
$restore_logdateformat = OC_Config::getValue('logdateformat'); $this->restore_logdateformat = OC_Config::getValue('logdateformat');
OC_Config::setValue("logfile", OC_Config::getValue('datadirectory') . "/logtest"); OC_Config::setValue("logfile", OC_Config::getValue('datadirectory') . "/logtest");
OC_Log_Owncloud::init(); OC_Log_Owncloud::init();

View File

@ -20,6 +20,11 @@
* *
*/ */
/**
* Class Test_OC_OCS_Privatedata
*
* @group DB
*/
class Test_OC_OCS_Privatedata extends \Test\TestCase { class Test_OC_OCS_Privatedata extends \Test\TestCase {
private $appKey; private $appKey;

View File

@ -28,6 +28,13 @@ use OC\Files\View;
use Test\Traits\MountProviderTrait; use Test\Traits\MountProviderTrait;
use Test\Traits\UserTrait; use Test\Traits\UserTrait;
/**
* Class Preview
*
* @group DB
*
* @package Test
*/
class Preview extends TestCase { class Preview extends TestCase {
use UserTrait; use UserTrait;
use MountProviderTrait; use MountProviderTrait;

View File

@ -21,6 +21,13 @@
namespace Test\Preview; namespace Test\Preview;
/**
* Class Bitmap
*
* @group DB
*
* @package Test\Preview
*/
class Bitmap extends Provider { class Bitmap extends Provider {
public function setUp() { public function setUp() {

View File

@ -21,6 +21,13 @@
namespace Test\Preview; namespace Test\Preview;
/**
* Class Image
*
* @group DB
*
* @package Test\Preview
*/
class Image extends Provider { class Image extends Provider {
public function setUp() { public function setUp() {

View File

@ -21,6 +21,13 @@
namespace Test\Preview; namespace Test\Preview;
/**
* Class MP3
*
* @group DB
*
* @package Test\Preview
*/
class MP3 extends Provider { class MP3 extends Provider {
public function setUp() { public function setUp() {

View File

@ -21,6 +21,13 @@
namespace Test\Preview; namespace Test\Preview;
/**
* Class SVG
*
* @group DB
*
* @package Test\Preview
*/
class SVG extends Provider { class SVG extends Provider {
public function setUp() { public function setUp() {

View File

@ -21,6 +21,13 @@
namespace Test\Preview; namespace Test\Preview;
/**
* Class TXT
*
* @group DB
*
* @package Test\Preview
*/
class TXT extends Provider { class TXT extends Provider {
public function setUp() { public function setUp() {

View File

@ -24,6 +24,13 @@
namespace Test; namespace Test;
/**
* Class Server
*
* @group DB
*
* @package Test
*/
class Server extends \Test\TestCase { class Server extends \Test\TestCase {
/** @var \OC\Server */ /** @var \OC\Server */
protected $server; protected $server;

View File

@ -20,6 +20,11 @@
* *
*/ */
/**
* Class Test_StreamWrappers
*
* @group DB
*/
class Test_StreamWrappers extends \Test\TestCase { class Test_StreamWrappers extends \Test\TestCase {
private static $trashBinStatus; private static $trashBinStatus;