summaryrefslogtreecommitdiffstats
path: root/tests/preseed-config.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-02-21 15:09:41 +0100
committerRobin Appelman <robin@icewind.nl>2018-02-26 14:54:15 +0100
commitfe05ecfd16c6f8d0317b0fcbeeea2235cb0c187a (patch)
tree018e88654098897a52f68689ff251092afae2d1e /tests/preseed-config.php
parent4bcc282a4865085e9dfa3c6a844e53605d65aaea (diff)
downloadnextcloud-server-fe05ecfd16c6f8d0317b0fcbeeea2235cb0c187a.tar.gz
nextcloud-server-fe05ecfd16c6f8d0317b0fcbeeea2235cb0c187a.zip
Other config
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/preseed-config.php')
-rw-r--r--tests/preseed-config.php46
1 files changed, 32 insertions, 14 deletions
diff --git a/tests/preseed-config.php b/tests/preseed-config.php
index c92c92b43b8..5277248b3d2 100644
--- a/tests/preseed-config.php
+++ b/tests/preseed-config.php
@@ -36,18 +36,36 @@ if (getenv('OBJECT_STORE') === 's3') {
}
if (getenv('OBJECT_STORE') === 'swift') {
$swiftHost = getenv('DRONE') === 'true' ? 'dockswift' : 'localhost';
- $auth = getenv('SWIFT-AUTH') === '' ? '2.0' : getenv('SWIFT-AUTH');
- $CONFIG['objectstore'] = [
- 'class' => 'OC\\Files\\ObjectStore\\Swift',
- 'arguments' => array(
- 'autocreate' => true,
- 'username' => 'swift',
- 'tenantName' => 'service',
- 'password' => 'swift',
- 'serviceName' => 'swift',
- 'region' => 'regionOne',
- 'url' => "http://$swiftHost:5000/$auth",
- 'bucket' => 'nextcloud'
- )
- ];
+
+ if (getenv('SWIFT-AUTH') === 'v2.0') {
+ $CONFIG['objectstore'] = [
+ 'class' => 'OC\\Files\\ObjectStore\\Swift',
+ 'arguments' => array(
+ 'autocreate' => true,
+ 'username' => 'swift',
+ 'tenantName' => 'service',
+ 'password' => 'swift',
+ 'serviceName' => 'swift',
+ 'region' => 'regionOne',
+ 'url' => "http://$swiftHost:5000/v2.0",
+ 'bucket' => 'nextcloud'
+ )
+ ];
+ } else {
+ $CONFIG['objectstore'] = [
+ 'class' => 'OC\\Files\\ObjectStore\\Swift',
+ 'arguments' => array(
+ 'autocreate' => true,
+ 'user' => [
+ 'id' => 'swift',
+ ],
+ 'tenantName' => 'service',
+ 'password' => 'swift',
+ 'serviceName' => 'swift',
+ 'region' => 'regionOne',
+ 'url' => "http://$swiftHost:5000/v3",
+ 'bucket' => 'nextcloud'
+ )
+ ];
+ }
}