Exemple #1
0
 public static function tearDownAfterClass()
 {
     // cleanup test user
     \OC_User::deleteUser(self::TEST_ENCRYPTION_HOOKS_USER1);
     \OC_User::deleteUser(self::TEST_ENCRYPTION_HOOKS_USER2);
     parent::tearDownAfterClass();
 }
Exemple #2
0
 public static function tearDownAfterClass()
 {
     // cleanup users
     \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER1);
     \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER2);
     \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER3);
 }
Exemple #3
0
 protected function tearDown()
 {
     $result = \OC_User::deleteUser(self::$user);
     $this->assertTrue($result);
     $this->logout();
     parent::tearDown();
 }
Exemple #4
0
 public function setUp()
 {
     if (!getenv('RUN_OBJECTSTORE_TESTS')) {
         $this->markTestSkipped('objectstore tests are unreliable on travis');
     }
     \OC_App::disable('files_sharing');
     \OC_App::disable('files_versions');
     // reset backend
     \OC_User::clearBackends();
     \OC_User::useBackend('database');
     // create users
     $users = array('test');
     foreach ($users as $userName) {
         \OC_User::deleteUser($userName);
         \OC_User::createUser($userName, $userName);
     }
     // main test user
     $userName = '******';
     \OC_Util::tearDownFS();
     \OC_User::setUserId('');
     \OC\Files\Filesystem::tearDown();
     \OC_User::setUserId('test');
     $testContainer = 'oc-test-container-' . substr(md5(rand()), 0, 7);
     $params = array('username' => 'facebook100000330192569', 'password' => 'Dbdj1sXnRSHxIGc4', 'container' => $testContainer, 'autocreate' => true, 'region' => 'RegionOne', 'url' => 'http://8.21.28.222:5000/v2.0', 'tenantName' => 'facebook100000330192569', 'serviceName' => 'swift', 'user' => \OC_User::getManager()->get($userName));
     $this->objectStorage = new ObjectStoreToTest($params);
     $params['objectstore'] = $this->objectStorage;
     $this->instance = new ObjectStoreStorage($params);
 }
Exemple #5
0
 public static function tearDownAfterClass()
 {
     // cleanup test user
     \OC_User::deleteUser(self::TEST_VERSIONS_USER);
     \OC_User::deleteUser(self::TEST_VERSIONS_USER2);
     parent::tearDownAfterClass();
 }
Exemple #6
0
 public static function tearDownAfterClass()
 {
     // cleanup test user
     \OC_User::deleteUser(self::TEST_ENCRYPTION_TRASHBIN_USER1);
     \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
     parent::tearDownAfterClass();
 }
Exemple #7
0
 public static function tearDownAfterClass()
 {
     \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER1);
     \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER2);
     \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER3);
     parent::tearDownAfterClass();
 }
Exemple #8
0
 public static function tearDownAfterClass()
 {
     // cleanup test user
     \OC_User::deleteUser(\Test_Encryption_Helper::TEST_ENCRYPTION_HELPER_USER1);
     \OC_User::deleteUser(\Test_Encryption_Helper::TEST_ENCRYPTION_HELPER_USER2);
     \OC_Hook::clear();
     \OC_FileProxy::clearProxies();
 }
Exemple #9
0
 protected function tearDown()
 {
     \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
     $this->logout();
     \OC_User::deleteUser($this->user);
     \OC_Hook::clear();
     parent::tearDown();
 }
 protected function tearDown()
 {
     $result = \OC_User::deleteUser(self::$user);
     $this->assertTrue($result);
     \OC\Files\Filesystem::tearDown();
     \OC\Files\Filesystem::mount($this->originalStorage, array(), '/');
     parent::tearDown();
 }
Exemple #11
0
 public function testDeleteUser()
 {
     $fail = \OC_User::deleteUser('victim');
     $this->assertFalse($fail);
     $success = \OC_User::createUser('victim', 'password');
     $success = \OC_User::deleteUser('victim');
     $this->assertTrue($success);
 }
 protected function tearDown()
 {
     foreach ($this->users as $user) {
         \OC_User::deleteUser($user);
     }
     \OC_Group::deleteGroup('admin');
     parent::tearDown();
 }
Exemple #13
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $wasSuccessful = \OC_User::deleteUser($input->getArgument('uid'));
     if ($wasSuccessful === true) {
         $output->writeln('The specified user was deleted');
         return;
     }
     $output->writeln('<error>The specified could not be deleted. Please check the logs.</error>');
 }
Exemple #14
0
 public function tearDown()
 {
     $userId = OCA_mozilla_sync\User::userHashToId($this->userHash);
     if ($userId != false) {
         OCA_mozilla_sync\User::deleteUser($userId);
     }
     OC_Preferences::deleteUser($this->userName);
     OC_User::deleteUser($this->userName);
 }
Exemple #15
0
 public function tearDown()
 {
     $userId = OCA_mozilla_sync\User::userHashToId($this->userHash);
     if ($userId != false) {
         OCA_mozilla_sync\User::deleteUser($userId);
     }
     \OC::$server->getConfig()->deleteAllUserValues($this->userName);
     OC_User::deleteUser($this->userName);
 }
 public function tearDown()
 {
     \OC_User::deleteUser($this->user);
     $sql = 'DELETE FROM `*PREFIX*storages`';
     $this->connection->executeQuery($sql);
     $sql = 'DELETE FROM `*PREFIX*filecache`';
     $this->connection->executeQuery($sql);
     \OCP\Config::setSystemValue('datadirectory', $this->oldDataDir);
     $this->config->setAppValue('core', 'repairlegacystoragesdone', 'no');
 }
Exemple #17
0
 public function tearDown()
 {
     OC_Mount_Config::$skipTest = false;
     \OC_User::deleteUser(self::TEST_USER2);
     \OC_User::deleteUser(self::TEST_USER1);
     \OC_Group::deleteGroup(self::TEST_GROUP1);
     \OC_Group::deleteGroup(self::TEST_GROUP2);
     @unlink($this->dataDir . '/mount.json');
     OCP\Config::setAppValue('files_external', 'user_mounting_backends', $this->oldAllowedBackends);
 }
Exemple #18
0
 public static function tearDownAfterClass()
 {
     \OC_FileProxy::$enabled = true;
     // cleanup test user
     \OC_User::deleteUser(\Test_Encryption_Keymanager::TEST_USER);
     // reset app files_trashbin
     if (self::$stateFilesTrashbin) {
         OC_App::enable('files_trashbin');
     }
 }
Exemple #19
0
 public static function tearDownAfterClass()
 {
     // cleanup test user
     \OC_User::deleteUser(self::TEST_TRASHBIN_USER1);
     \OC_Config::setValue('trashbin_retention_obligation', self::$rememberRetentionObligation);
     \OC_Config::setValue('trashbin_auto_expire', self::$rememberAutoExpire);
     \OC_Hook::clear();
     \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
     parent::tearDownAfterClass();
 }
Exemple #20
0
 public function tearDown()
 {
     $u = new OC_User();
     foreach ($this->users as $user) {
         $u->deleteUser($user);
     }
     foreach ($this->tmpfiles as $file) {
         \OC_Helper::rmdirr($file);
     }
 }
Exemple #21
0
 public static function tearDownAfterClass()
 {
     // cleanup test user
     \OC_User::deleteUser(\Test_Encryption_Stream::TEST_ENCRYPTION_STREAM_USER1);
     \OC_Hook::clear();
     \OC_FileProxy::clearProxies();
     // Delete keys in /data/
     $view = new \OC\Files\View('/');
     $view->rmdir('public-keys');
     $view->rmdir('owncloud_private_key');
 }
Exemple #22
0
 public static function tearDownAfterClass()
 {
     // cleanup test user
     \OC_User::deleteUser(self::TEST_TRASHBIN_USER1);
     if (self::$encryptionStatus === true) {
         \OC_App::enable('files_encryption');
     }
     \OC_Config::setValue('trashbin_retention_obligation', self::$rememberRetentionObligation);
     \OC_Config::setValue('trashbin_auto_expire', self::$rememberAutoExpire);
     \OC_Hook::clear();
 }
 protected function tearDown()
 {
     $data = new Data($this->getMock('\\OCP\\Activity\\IManager'));
     $data->deleteActivities(array('affecteduser' => 'activity-api-user1'));
     \OC_User::deleteUser('activity-api-user1');
     $data->deleteActivities(array('affecteduser' => 'activity-api-user2'));
     \OC_User::deleteUser('activity-api-user2');
     $data->deleteActivities(array('type' => 'test'));
     \OC::$WEBROOT = $this->originalWEBROOT;
     parent::tearDown();
 }
 protected function tearDown()
 {
     \OC_Util::tearDownFS();
     \OC_User::setUserId('');
     Filesystem::tearDown();
     \OC_User::deleteUser($this->user);
     \OC_User::setIncognitoMode(false);
     \OC::$server->getSession()->set('public_link_authenticated', '');
     // Set old user
     \OC_User::setUserId($this->oldUser);
     \OC_Util::setupFS($this->oldUser);
 }
Exemple #25
0
 public static function tearDownAfterClass()
 {
     // cleanup test user
     \OC_User::deleteUser(self::TEST_TRASHBIN_USER1);
     \OC::$server->getConfig()->setSystemValue('trashbin_retention_obligation', self::$rememberRetentionObligation);
     \OC_Hook::clear();
     \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
     if (self::$trashBinStatus) {
         \OC::$server->getAppManager()->enableApp('files_trashbin');
     }
     parent::tearDownAfterClass();
 }
 public function tearDown()
 {
     $this->user = null;
     if ($this->storageMock) {
         $this->storageMock->getCache()->clear();
         $this->storageMock = null;
     }
     \OC\Files\Filesystem::tearDown();
     \OC_User::setUserId('');
     \OC_User::deleteUser($this->user);
     \OC_Preferences::deleteUser($this->user);
 }
Exemple #27
0
 protected function tearDown()
 {
     if (is_null($this->instance)) {
         return;
     }
     $this->objectStorage->deleteContainer(true);
     $this->instance->getCache()->clear();
     $users = array('test');
     foreach ($users as $userName) {
         \OC_User::deleteUser($userName);
     }
     parent::tearDown();
 }
Exemple #28
0
 public function tearDown()
 {
     if ($this->cache) {
         $this->cache->clear();
     }
     $result = \OC_User::deleteUser(self::$user);
     $this->assertTrue($result);
     Filesystem::tearDown();
     // reset app files_encryption
     if ($this->stateFilesEncryption) {
         \OC_App::enable('files_encryption');
     }
 }
Exemple #29
0
 protected function tearDown()
 {
     $this->user = null;
     if ($this->storageMock) {
         $this->storageMock->getCache()->clear();
         $this->storageMock = null;
     }
     \OC\Files\Filesystem::tearDown();
     \OC\Files\Filesystem::mount($this->storage, array(), '/');
     \OC_User::setUserId('');
     \OC_User::deleteUser($this->user);
     \OC::$server->getConfig()->deleteAllUserValues($this->user);
     parent::tearDown();
 }
Exemple #30
0
 public static function tearDownAfterClass()
 {
     // cleanup users
     \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER1);
     \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER2);
     \OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER3);
     // delete group
     \OC_Group::deleteGroup(self::TEST_FILES_SHARING_API_GROUP1);
     // reset app files_encryption
     if (self::$stateFilesEncryption) {
         \OC_App::enable('files_encryption');
     } else {
         \OC_App::disable('files_encryption');
     }
 }