Skip to content

Commit 117f059

Browse files
committed
fixup! ci: fix files external workflow for s3 testing
1 parent dafe423 commit 117f059

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.github/workflows/files-external-s3.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,14 @@ jobs:
9292
9393
- name: Wait for S3
9494
run: |
95-
sleep 10
9695
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
9796
9897
- name: PHPUnit
9998
run: |
10099
composer run test:files_external -- \
101-
apps/files_external/tests/Storage/Amazons3Test.php \
102-
apps/files_external/tests/Storage/VersionedAmazonS3Test.php \
100+
--group S3 \
103101
--log-junit junit.xml \
102+
apps/files_external/tests/Storage \
104103
${{ matrix.coverage && '--coverage-clover ./clover.xml' || '' }}
105104
106105
- name: Upload code coverage
@@ -169,7 +168,7 @@ jobs:
169168
composer install
170169
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
171170
./occ app:enable --force files_external
172-
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
171+
echo "<?php return ['run' => true, 'localstack' => 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
173172
174173
- name: PHPUnit
175174
run: composer run test:files_external -- \

apps/files_external/tests/Storage/Amazons3MultiPartTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Class Amazons3Test
1414
*
1515
* @group DB
16+
* @group S3
1617
*
1718
* @package OCA\Files_External\Tests\Storage
1819
*/
@@ -25,7 +26,7 @@ protected function setUp(): void {
2526
parent::setUp();
2627

2728
$this->config = include('files_external/tests/config.amazons3.php');
28-
if (! is_array($this->config) or ! $this->config['run']) {
29+
if (!is_array($this->config) || !$this->config['run']) {
2930
$this->markTestSkipped('AmazonS3 backend not configured');
3031
}
3132
$this->instance = new AmazonS3($this->config + [
@@ -47,6 +48,10 @@ public function testStat(): void {
4748
}
4849

4950
public function testHashInFileName(): void {
50-
$this->markTestSkipped('Localstack has a bug with hashes in filename');
51+
if (isset($this->config['localstack'])) {
52+
$this->markTestSkipped('Localstack has a bug with hashes in filename');
53+
}
54+
55+
parent::testHashInFileName();
5156
}
5257
}

apps/files_external/tests/Storage/Amazons3Test.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Class Amazons3Test
1515
*
1616
* @group DB
17+
* @group S3
1718
*
1819
* @package OCA\Files_External\Tests\Storage
1920
*/

apps/files_external/tests/Storage/VersionedAmazonS3Test.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/**
1212
* @group DB
13+
* @group S3
1314
*/
1415
class VersionedAmazonS3Test extends Amazons3Test {
1516
protected function setUp(): void {

0 commit comments

Comments
 (0)