Compare commits

...

3 Commits

Author SHA1 Message Date
Julius Härtl c941251edc
Use minio for s3 tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-05-28 19:24:21 +02:00
Julius Härtl acbc0032ce
fixup! Run s3 tests again 2021-05-28 09:56:04 +02:00
Julius Härtl be81879d4e
Run s3 tests again
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-05-28 09:49:42 +02:00
3 changed files with 9 additions and 9 deletions

View File

@ -2122,6 +2122,7 @@ steps:
- name: object-store - name: object-store
image: nextcloudci/php7.4:php7.4-3 image: nextcloudci/php7.4:php7.4-3
environment: environment:
OBJECT_STORE: s3
CODECOV_TOKEN: CODECOV_TOKEN:
from_secret: CODECOV_TOKEN from_secret: CODECOV_TOKEN
commands: commands:
@ -2133,7 +2134,10 @@ steps:
services: services:
- name: fake-s3 - name: fake-s3
image: lphoward/fake-s3:latest image: minio/minio
environment:
MINIO_ACCESS_KEY: dummy
MINIO_SECRET_KEY: dummy
trigger: trigger:
branch: branch:
@ -2155,6 +2159,7 @@ steps:
- name: object-store - name: object-store
image: nextcloudci/php7.4:php7.4-3 image: nextcloudci/php7.4:php7.4-3
environment: environment:
OBJECT_STORE: azure
CODECOV_TOKEN: CODECOV_TOKEN:
from_secret: CODECOV_TOKEN from_secret: CODECOV_TOKEN
commands: commands:

View File

@ -62,7 +62,7 @@ class NonSeekableStream extends Wrapper {
class S3Test extends ObjectStoreTest { class S3Test extends ObjectStoreTest {
protected function getInstance() { protected function getInstance() {
$config = \OC::$server->getConfig()->getSystemValue('objectstore'); $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'); $this->markTestSkipped('objectstore not configured for s3');
} }
@ -70,11 +70,6 @@ class S3Test extends ObjectStoreTest {
} }
public function testUploadNonSeekable() { 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 = $this->getInstance();
$s3->writeObject('multiparttest', NonSeekableStream::wrap(fopen(__FILE__, 'r'))); $s3->writeObject('multiparttest', NonSeekableStream::wrap(fopen(__FILE__, 'r')));

View File

@ -27,8 +27,8 @@ if (getenv('OBJECT_STORE') === 's3') {
'autocreate' => true, 'autocreate' => true,
'key' => 'dummy', 'key' => 'dummy',
'secret' => 'dummy', 'secret' => 'dummy',
'hostname' => getenv('DRONE') === 'true' ? 'fake-s3' : 'localhost', 'hostname' => getenv('DRONE') === 'true' ? 'minio' : 'localhost',
'port' => 4569, 'port' => 9000,
'use_ssl' => false, 'use_ssl' => false,
// required for some non amazon s3 implementations // required for some non amazon s3 implementations
'use_path_style' => true 'use_path_style' => true