Add DB group to some files_external tests

Adding group Db to federation tests and ldap tests

Add group DB to Test_UrlGenerator

Adding group DB to trashbin and versions tests

Adding group DB to Test_Util_CheckServer for pg
This commit is contained in:
Thomas Müller 2015-11-25 16:58:54 +01:00
parent 26d758f0b1
commit f9fc254672
20 changed files with 123 additions and 2 deletions

View File

@ -34,6 +34,13 @@ use OCP\Http\Client\IResponse;
use OCP\ILogger;
use OCP\IURLGenerator;
/**
* Class GetSharedSecretTest
*
* @group DB
*
* @package OCA\Federation\Tests\BackgroundJob
*/
class GetSharedSecretTest extends TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject | IClient */

View File

@ -25,6 +25,13 @@
namespace Test\Files\Storage;
/**
* Class AmazonS3Migration
*
* @group DB
*
* @package Test\Files\Storage
*/
class AmazonS3Migration extends \Test\TestCase {
/**

View File

@ -26,6 +26,13 @@ namespace Tests\Files_External;
use OC\Files\Filesystem;
use OC\User\User;
/**
* Class EtagPropagator
*
* @group DB
*
* @package Tests\Files_External
*/
class EtagPropagator extends \Test\TestCase {
protected function getUser() {
return new User($this->getUniqueID(), null);

View File

@ -24,6 +24,13 @@
namespace Test\Files\Storage;
/**
* Class OwnCloudFunctions
*
* @group DB
*
* @package Test\Files\Storage
*/
class OwnCloudFunctions extends \Test\TestCase {
function configUrlProvider() {

View File

@ -24,6 +24,13 @@ namespace OCA\Files_Trashbin\Tests\Command;
use OCA\Files_Trashbin\Command\Expire;
use Test\TestCase;
/**
* Class ExpireTest
*
* @group DB
*
* @package OCA\Files_Trashbin\Tests\Command
*/
class ExpireTest extends TestCase {
public function testExpireNonExistingUser() {
$command = new Expire('test');

View File

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

View File

@ -25,6 +25,13 @@ namespace OCA\Files_Versions\Tests\Command;
use OCA\Files_Versions\Command\Expire;
use Test\TestCase;
/**
* Class ExpireTest
*
* @group DB
*
* @package OCA\Files_Versions\Tests\Command
*/
class ExpireTest extends TestCase {
public function testExpireNonExistingUser() {
$command = new Expire($this->getUniqueID('test'), '');

View File

@ -28,6 +28,13 @@ use \OCA\user_ldap\lib\Access;
use \OCA\user_ldap\lib\Connection;
use \OCA\user_ldap\lib\ILDAPWrapper;
/**
* Class Test_Access
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_Access extends \Test\TestCase {
private function getConnectorAndLdapMock() {
static $conMethods;

View File

@ -23,6 +23,13 @@
namespace OCA\user_ldap\tests;
/**
* Class Test_Connection
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_Connection extends \Test\TestCase {
public function testOriginalAgentUnchangedOnClone() {
@ -52,4 +59,4 @@ class Test_Connection extends \Test\TestCase {
$this->assertSame($agentPawd, $agent['ldapAgentPassword']);
}
}
}

View File

@ -30,6 +30,13 @@ use \OCA\user_ldap\lib\Access;
use \OCA\user_ldap\lib\Connection;
use \OCA\user_ldap\lib\ILDAPWrapper;
/**
* Class Test_Group_Ldap
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_Group_Ldap extends \Test\TestCase {
private function getAccessMock() {
static $conMethods;

View File

@ -24,6 +24,13 @@ namespace OCA\user_ldap\tests\mapping;
use OCA\User_LDAP\Mapping\GroupMapping;
/**
* Class Test_GroupMapping
*
* @group DB
*
* @package OCA\user_ldap\tests\mapping
*/
class Test_GroupMapping extends AbstractMappingTest {
public function getMapper(\OCP\IDBConnection $dbMock) {
return new GroupMapping($dbMock);

View File

@ -24,6 +24,13 @@ namespace OCA\user_ldap\tests\mapping;
use OCA\User_LDAP\Mapping\UserMapping;
/**
* Class Test_UserMapping
*
* @group DB
*
* @package OCA\user_ldap\tests\mapping
*/
class Test_UserMapping extends AbstractMappingTest {
public function getMapper(\OCP\IDBConnection $dbMock) {
return new UserMapping($dbMock);

View File

@ -26,6 +26,13 @@ namespace OCA\user_ldap\tests;
use OCA\user_ldap\lib\user\Manager;
/**
* Class Test_User_Manager
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_User_Manager extends \Test\TestCase {
private function getTestInstances() {

View File

@ -25,6 +25,13 @@ namespace OCA\user_ldap\tests;
use OCA\user_ldap\lib\user\User;
/**
* Class Test_User_User
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_User_User extends \Test\TestCase {
private function getTestInstances() {

View File

@ -31,6 +31,13 @@ use \OCA\user_ldap\lib\Access;
use \OCA\user_ldap\lib\Connection;
use \OCA\user_ldap\lib\ILDAPWrapper;
/**
* Class Test_User_Ldap_Direct
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_User_Ldap_Direct extends \Test\TestCase {
protected $backend;
protected $access;

View File

@ -31,6 +31,13 @@ use \OCA\user_ldap\lib\Wizard;
// use \OCA\user_ldap\lib\Configuration;
// use \OCA\user_ldap\lib\ILDAPWrapper;
/**
* Class Test_Wizard
*
* @group DB
*
* @package OCA\user_ldap\tests
*/
class Test_Wizard extends \Test\TestCase {
protected function setUp() {
parent::setUp();

View File

@ -105,6 +105,7 @@ class DAV extends Common {
$this->secure = false;
}
if ($this->secure === true) {
// inject mock for testing
$certPath = \OC_User::getHome(\OC_User::getUser()) . '/files_external/rootcerts.crt';
if (file_exists($certPath)) {
$this->certPath = $certPath;

View File

@ -62,6 +62,7 @@ class URLGenerator implements IURLGenerator {
* Returns a url to the given route.
*/
public function linkToRoute($route, $parameters = array()) {
// TODO: mock router
$urlLinkTo = \OC::$server->getRouter()->generate($route, $parameters);
return $urlLinkTo;
}

View File

@ -6,7 +6,12 @@
* See the COPYING-README file.
*/
class Test_Urlgenerator extends \Test\TestCase {
/**
* Class Test_UrlGenerator
*
* @group DB
*/
class Test_UrlGenerator extends \Test\TestCase {
/**
* @small

View File

@ -8,6 +8,8 @@
/**
* Tests for server check functions
*
* @group DB
*/
class Test_Util_CheckServer extends \Test\TestCase {