summaryrefslogtreecommitdiffstats
path: root/tests/preseed-config.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/preseed-config.php')
-rw-r--r--tests/preseed-config.php48
1 files changed, 35 insertions, 13 deletions
diff --git a/tests/preseed-config.php b/tests/preseed-config.php
index 5fbdc565417..779868310dc 100644
--- a/tests/preseed-config.php
+++ b/tests/preseed-config.php
@@ -36,17 +36,39 @@ if (getenv('OBJECT_STORE') === 's3') {
}
if (getenv('OBJECT_STORE') === 'swift') {
$swiftHost = getenv('DRONE') === 'true' ? 'dockswift' : 'localhost';
- $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'
- )
- ];
+
+ 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' => [
+ 'name' => 'swift',
+ 'password' => 'swift',
+ 'domain' => [
+ 'name' => 'default',
+ ]
+ ],
+ 'tenantName' => 'service',
+ 'serviceName' => 'swift',
+ 'region' => 'regionOne',
+ 'url' => "http://$swiftHost:5000/v3",
+ 'bucket' => 'nextcloud'
+ )
+ ];
+ }
}