Skip to content

Commit 22b9d91

Browse files
committed
test: only skip tests failing on localstack for localstack
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent de338d9 commit 22b9d91

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
env:
147147
SERVICES: s3
148148
DEBUG: 1
149-
image: localstack/localstack@sha256:b52c16663c70b7234f217cb993a339b46686e30a1a5d9279cb5feeb2202f837c # v4.4.0
149+
image: localstack/localstack@sha256:9d4253786e0effe974d77fe3c390358391a56090a4fff83b4600d8a64404d95d # v4.5.0
150150
ports:
151151
- "4566:4566"
152152

@@ -173,7 +173,7 @@ jobs:
173173
composer install
174174
./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
175175
./occ app:enable --force files_external
176-
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
176+
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
177177
178178
- name: PHPUnit
179179
run: |

apps/files_external/tests/Storage/Amazons3MultiPartTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ public function testStat(): void {
4848
}
4949

5050
public function testHashInFileName(): void {
51-
$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();
5256
}
5357
}

apps/files_external/tests/Storage/Amazons3Test.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public function testStat(): void {
4646
}
4747

4848
public function testHashInFileName(): void {
49-
$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();
5053
}
5154
}

0 commit comments

Comments
 (0)