]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use minio for s3 tests 27804/head
authorJulius Härtl <jus@bitgrid.net>
Fri, 28 May 2021 17:24:21 +0000 (19:24 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 5 Jul 2021 10:01:32 +0000 (10:01 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
.drone.yml
tests/drone-wait-objectstore.sh
tests/preseed-config.php

index ce2de25b823d47128d1fe73671c1b168a1111e47..5a76da3d19e04d35702dbcf22809d72051c36a30 100644 (file)
@@ -2148,6 +2148,15 @@ kind: pipeline
 name: object-store-s3
 
 steps:
+- name: minio
+  image: ghcr.io/nextcloud/continuous-integration-minio:latest
+  detach: true
+  commands:
+    - mkdir /s3data
+    - minio server /s3data
+  environment:
+    MINIO_ROOT_USER: nextcloud
+    MINIO_ROOT_PASSWORD: nextcloud
 - name: submodules
   image: docker:git
   commands:
index 7914d45bed1dfa1192ac95acd852305a88fe7c81..7817d946682f93c01f324873ed6ec3041e479321 100755 (executable)
@@ -12,6 +12,12 @@ function get_swift_token() {
     fi
 }
 
+if [ "$OBJECT_STORE" == "s3" ]; then
+       echo "Waiting for minio to be ready"
+       timeout 60 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://minio:9000)" != "403" ]]; do sleep 5; done' || (
+               echo "Failed to wait for minio to be ready" && exit 1
+       )
+fi
 if [ "$OBJECT_STORE" == "swift" ]; then
     echo "waiting for keystone"
     until get_swift_token
index fdea46230c3b15d0feed8d548ae77d8c1faae888..c495d569bb5e754dc5fb55804c112ca51c2dcb55 100644 (file)
@@ -25,10 +25,10 @@ if (getenv('OBJECT_STORE') === 's3') {
                'arguments' => [
                        'bucket' => 'nextcloud',
                        'autocreate' => true,
-                       'key' => 'dummy',
-                       'secret' => 'dummy',
-                       'hostname' => getenv('DRONE') === 'true' ? 'fake-s3' : 'localhost',
-                       'port' => 4569,
+                       'key' => 'nextcloud',
+                       'secret' => 'nextcloud',
+                       'hostname' => getenv('DRONE') === 'true' ? 'minio' : 'localhost',
+                       'port' => 9000,
                        'use_ssl' => false,
                        // required for some non amazon s3 implementations
                        'use_path_style' => true