test: fix s3 external storage tests to run all storages on ci

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/53425/head
Ferdinand Thiessen 2025-06-06 14:06:57 +07:00
parent 5cddf5a85d
commit 99488b0a38
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
4 changed files with 16 additions and 10 deletions

@ -91,14 +91,15 @@ jobs:
- name: Wait for S3
run: |
sleep 10
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
- name: PHPUnit
run: composer run test:files_external -- \
apps/files_external/tests/Storage/Amazons3Test.php \
apps/files_external/tests/Storage/VersionedAmazonS3Test.php \
${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }}
run: |
composer run test:files_external -- \
--group S3 \
--log-junit junit.xml \
apps/files_external/tests/Storage \
${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }}
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
@ -163,10 +164,12 @@ jobs:
echo "<?php return ['run' => true,'hostname' => 'localhost','key' => 'ignored','secret' => 'ignored', 'bucket' => 'bucket', 'port' => 4566, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/files_external/tests/config.amazons3.php
- name: PHPUnit
run: composer run test:files_external -- \
apps/files_external/tests/Storage/Amazons3Test.php \
apps/files_external/tests/Storage/VersionedAmazonS3Test.php \
${{ matrix.coverage && ' --coverage-clover ./clover.xml' || '' }}
run: |
composer run test:files_external -- \
--group S3 \
--log-junit junit.xml \
apps/files_external/tests/Storage \
${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }}
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}

@ -11,6 +11,7 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
* Class Amazons3Test
*
* @group DB
* @group S3
*
* @package OCA\Files_External\Tests\Storage
*/
@ -23,7 +24,7 @@ class Amazons3MultiPartTest extends \Test\Files\Storage\Storage {
parent::setUp();
$this->config = include('files_external/tests/config.amazons3.php');
if (! is_array($this->config) or ! $this->config['run']) {
if (!is_array($this->config) || !$this->config['run']) {
$this->markTestSkipped('AmazonS3 backend not configured');
}
$this->instance = new AmazonS3($this->config + [

@ -12,6 +12,7 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
* Class Amazons3Test
*
* @group DB
* @group S3
*
* @package OCA\Files_External\Tests\Storage
*/

@ -10,6 +10,7 @@ namespace OCA\Files_External\Tests\Storage;
/**
* @group DB
* @group S3
*/
class VersionedAmazonS3Test extends Amazons3Test {
protected function setUp(): void {