summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-06-13 17:22:21 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-06-18 12:53:20 +0200
commit5722e31d1a277199e9b8ae85a21685abf3436418 (patch)
treeb06e4bc30229a1d2f519190b782403a5871b9ca6 /tests
parent1410cb10b4cb31a52901ee12e38a2c27d2177cf3 (diff)
downloadnextcloud-server-5722e31d1a277199e9b8ae85a21685abf3436418.tar.gz
nextcloud-server-5722e31d1a277199e9b8ae85a21685abf3436418.zip
add autocreate config option for containers, implement autocreate and delete of containers, use generated container names for tests
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/objectstore/swift.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/lib/files/objectstore/swift.php b/tests/lib/files/objectstore/swift.php
index 1e7495e0a22..497ea7f241c 100644
--- a/tests/lib/files/objectstore/swift.php
+++ b/tests/lib/files/objectstore/swift.php
@@ -53,11 +53,14 @@ class Swift extends PHPUnit_Framework_TestCase {
\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' => 'owncloud',
+ 'container' => $testContainer,
+ 'autocreate' => true,
'region' => 'RegionOne', //required, trystack defaults to 'RegionOne'
'url' => 'http://8.21.28.222:5000/v2.0', // The Identity / Keystone endpoint
'tenantName' => 'facebook100000330192569', // required on trystack
@@ -71,6 +74,7 @@ class Swift extends PHPUnit_Framework_TestCase {
if (is_null($this->storage)) {
return;
}
+ $this->storage->deleteContainer(true);
$this->storage->getCache()->clear();
//TODO how do I clear hooks?
}