mirror of
https://github.com/nextcloud/server.git
synced 2026-03-14 22:53:43 -04:00
test: fix s3 external storage tests to run all storages on ci
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
ec94fef485
commit
f8f1de4b0b
4 changed files with 16 additions and 10 deletions
21
.github/workflows/files-external-s3.yml
vendored
21
.github/workflows/files-external-s3.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
|
|||
* Class Amazons3Test
|
||||
*
|
||||
* @group DB
|
||||
* @group S3
|
||||
*
|
||||
* @package OCA\Files_External\Tests\Storage
|
||||
*/
|
||||
|
|
@ -24,7 +25,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 + [
|
||||
|
|
|
|||
|
|
@ -13,6 +13,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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue