Skip to content

Commit 4d96448

Browse files
committed
test: only skip tests failing on localstack for localstack
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 6f9c6a2 commit 4d96448

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
env:
135135
SERVICES: s3
136136
DEBUG: 1
137-
image: localstack/localstack@sha256:b52c16663c70b7234f217cb993a339b46686e30a1a5d9279cb5feeb2202f837c # v4.4.0
137+
image: localstack/localstack@sha256:9d4253786e0effe974d77fe3c390358391a56090a4fff83b4600d8a64404d95d # v4.5.0
138138
ports:
139139
- "4566:4566"
140140

@@ -161,7 +161,7 @@ jobs:
161161
composer install
162162
./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
163163
./occ app:enable --force files_external
164-
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
164+
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
165165
166166
- name: PHPUnit
167167
run: |

apps/files_external/tests/Storage/Amazons3MultiPartTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ public function testStat() {
4646
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
4747
}
4848

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

apps/files_external/tests/Storage/Amazons3Test.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public function testStat() {
4444
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
4545
}
4646

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

0 commit comments

Comments
 (0)