Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/drone-wait-objectstore.sh10
-rw-r--r--tests/lib/Files/ObjectStore/SwiftTest.php3
-rw-r--r--tests/preseed-config.php16
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/drone-wait-objectstore.sh b/tests/drone-wait-objectstore.sh
new file mode 100755
index 00000000000..1e5a13ee55e
--- /dev/null
+++ b/tests/drone-wait-objectstore.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [ "$OBJECT_STORE" == "swift" ]; then
+ echo "waiting for swift"
+ until curl -I http://dockswift:5000/v3
+ do
+ sleep 2
+ done
+ sleep 30
+fi
diff --git a/tests/lib/Files/ObjectStore/SwiftTest.php b/tests/lib/Files/ObjectStore/SwiftTest.php
index f2aeace769c..1ea55a84628 100644
--- a/tests/lib/Files/ObjectStore/SwiftTest.php
+++ b/tests/lib/Files/ObjectStore/SwiftTest.php
@@ -23,6 +23,9 @@ namespace Test\Files\ObjectStore;
use OC\Files\ObjectStore\Swift;
+/**
+ * @group PRIMARY-swift
+ */
class SwiftTest extends ObjectStoreTest {
/**
* @return \OCP\Files\ObjectStore\IObjectStore
diff --git a/tests/preseed-config.php b/tests/preseed-config.php
index 7c080038734..5fbdc565417 100644
--- a/tests/preseed-config.php
+++ b/tests/preseed-config.php
@@ -34,3 +34,19 @@ 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'
+ )
+ ];
+}