summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2021-07-05 11:52:48 +0200
committerGitHub <noreply@github.com>2021-07-05 11:52:48 +0200
commit415d7049591d6b5c92f682450941373e1ae34872 (patch)
tree9a5aabffe34bca4c023cdad7a9906c977a1cf5fe /tests
parentbb22d38aa10e58de0103aa57ecbdf60b167c59bb (diff)
parent55cabef7230e2a83903644727440c777fd923690 (diff)
downloadnextcloud-server-415d7049591d6b5c92f682450941373e1ae34872.tar.gz
nextcloud-server-415d7049591d6b5c92f682450941373e1ae34872.zip
Merge pull request #27198 from nextcloud/tests/run-s3-tests
Run s3 tests again
Diffstat (limited to 'tests')
-rwxr-xr-xtests/drone-wait-objectstore.sh6
-rw-r--r--tests/lib/Files/ObjectStore/S3Test.php7
-rw-r--r--tests/preseed-config.php8
3 files changed, 11 insertions, 10 deletions
diff --git a/tests/drone-wait-objectstore.sh b/tests/drone-wait-objectstore.sh
index 7914d45bed1..7817d946682 100755
--- a/tests/drone-wait-objectstore.sh
+++ b/tests/drone-wait-objectstore.sh
@@ -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
diff --git a/tests/lib/Files/ObjectStore/S3Test.php b/tests/lib/Files/ObjectStore/S3Test.php
index 97814212382..25bee9cbdd8 100644
--- a/tests/lib/Files/ObjectStore/S3Test.php
+++ b/tests/lib/Files/ObjectStore/S3Test.php
@@ -62,7 +62,7 @@ class NonSeekableStream extends Wrapper {
class S3Test extends ObjectStoreTest {
protected function getInstance() {
$config = \OC::$server->getConfig()->getSystemValue('objectstore');
- if (!is_array($config) || $config['class'] !== 'OC\\Files\\ObjectStore\\S3') {
+ if (!is_array($config) || $config['class'] !== S3::class) {
$this->markTestSkipped('objectstore not configured for s3');
}
@@ -70,11 +70,6 @@ class S3Test extends ObjectStoreTest {
}
public function testUploadNonSeekable() {
- $config = \OC::$server->getConfig()->getSystemValue('objectstore');
- if (!is_array($config) || $config['class'] !== 'OC\\Files\\ObjectStore\\S3') {
- $this->markTestSkipped('objectstore not configured for s3');
- }
-
$s3 = $this->getInstance();
$s3->writeObject('multiparttest', NonSeekableStream::wrap(fopen(__FILE__, 'r')));
diff --git a/tests/preseed-config.php b/tests/preseed-config.php
index 97c8a1d11a8..16aea87c8a7 100644
--- a/tests/preseed-config.php
+++ b/tests/preseed-config.php
@@ -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