Skip to content

Commit 4e3f9f4

Browse files
committed
fixup! ci: fix files external workflow for s3 testing
1 parent e8c7e75 commit 4e3f9f4

4 files changed

Lines changed: 17 additions & 8 deletions

File tree

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
services:
5656
minio:
57-
image: bitnami/minio@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 # v2025.4.22
57+
image: bitnami/minio@sha256:451fe6858cb770cc9d0e77ba811ce287420f781c7c1b806a386f6896471a349c # v2025.5.24
5858
env:
5959
MINIO_ROOT_USER: nextcloud
6060
MINIO_ROOT_PASSWORD: bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ=
@@ -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: 5 additions & 1 deletion
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
*/
@@ -45,6 +46,9 @@ public function testStat(): void {
4546
}
4647

4748
public function testHashInFileName(): void {
48-
$this->markTestSkipped('Localstack has a bug with hashes in filename');
49+
if (isset($this->config['localstack'])) {
50+
$this->markTestSkipped('Localstack has a bug with hashes in filename');
51+
}
52+
parent::testHashInFileName();
4953
}
5054
}

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)