aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-02-26 18:30:00 +0100
committerGitHub <noreply@github.com>2018-02-26 18:30:00 +0100
commit8867629cf1b195b6c0e4616d8943f4fd31c42b7b (patch)
tree29f9677409501e78819e4c579e8e5e1c2f923888 /tests
parent4076c091951543289b310119e0f4e598143364be (diff)
parentd40c61a71a718db01df5a2b145be14641e2c5163 (diff)
downloadnextcloud-server-8867629cf1b195b6c0e4616d8943f4fd31c42b7b.tar.gz
nextcloud-server-8867629cf1b195b6c0e4616d8943f4fd31c42b7b.zip
Merge pull request #8359 from nextcloud/swift-v3
Support swift v3 authentication
Diffstat (limited to 'tests')
-rwxr-xr-xtests/drone-wait-objectstore.sh7
-rw-r--r--tests/preseed-config.php48
2 files changed, 42 insertions, 13 deletions
diff --git a/tests/drone-wait-objectstore.sh b/tests/drone-wait-objectstore.sh
index 228accc3da9..7914d45bed1 100755
--- a/tests/drone-wait-objectstore.sh
+++ b/tests/drone-wait-objectstore.sh
@@ -44,6 +44,7 @@ if [ "$OBJECT_STORE" == "swift" ]; then
echo "creating test file"
+ i=0
while [ 1 ]
do
sleep 2
@@ -54,6 +55,12 @@ if [ "$OBJECT_STORE" == "swift" ]; then
then
break
fi
+
+ i=$((i + 1))
+ if [ "$i" == "20" ]
+ then
+ exit -1
+ fi
done
echo "deleting test file"
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'
+ )
+ ];
+ }
}