]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use minio for s3 tests 27198/head
authorJulius Härtl <jus@bitgrid.net>
Fri, 28 May 2021 17:24:21 +0000 (19:24 +0200)
committerJulius Härtl <jus@bitgrid.net>
Thu, 1 Jul 2021 06:22:24 +0000 (08:22 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
.drone.yml
tests/drone-wait-objectstore.sh
tests/preseed-config.php

index 8fcf944f12dbaf06ceb396cc09de4f98558714b7..e5ef78f3d18fbb274b233cddf02fe872387b2630 100644 (file)
@@ -2117,6 +2117,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: ghcr.io/nextcloud/continuous-integration-alpine-git:latest
   commands:
@@ -2134,10 +2143,6 @@ steps:
     - wget https://codecov.io/bash -O codecov.sh
     - bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
 
-services:
-- name: fake-s3
-  image: ghcr.io/nextcloud/continuous-integration-fake-s3:latest
-
 trigger:
   branch:
     - master
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 97c8a1d11a814ca693a55c4be0e9563512c255ad..16aea87c8a7a26a68e729c4e857065c5c533b144 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