Skip to content

Commit d6920fa

Browse files
susnuxAndyScherzinger
authored andcommitted
test: reenable localstack tests (bug fixed) but disable MinIO versioned copy test
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent e4dba8c commit d6920fa

File tree

4 files changed

+14
-21
lines changed

4 files changed

+14
-21
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444

4545
strategy:
4646
matrix:
47-
php-versions: ['8.1', '8.2', '8.3']
47+
php-versions: ['8.1', '8.2']
4848
include:
49-
- php-versions: '8.2'
49+
- php-versions: '8.3'
5050
coverage: ${{ github.event_name != 'pull_request' }}
5151

5252
name: php${{ matrix.php-versions }}-s3
@@ -87,7 +87,7 @@ jobs:
8787
composer install
8888
./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
8989
./occ app:enable --force files_external
90-
echo "<?php return ['run' => true, 'secret' => 'actually-not-secret', 'passwordsalt' => 'actually-not-secret', 'hostname' => 'localhost','key' => '$OBJECT_STORE_KEY','secret' => '$OBJECT_STORE_SECRET', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/files_external/tests/config.amazons3.php
90+
echo "<?php return ['run' => true, 'minio' => true, 'secret' => 'actually-not-secret', 'passwordsalt' => 'actually-not-secret', 'hostname' => 'localhost','key' => '$OBJECT_STORE_KEY','secret' => '$OBJECT_STORE_SECRET', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/files_external/tests/config.amazons3.php
9191
9292
- name: Wait for S3
9393
run: |
@@ -122,7 +122,7 @@ jobs:
122122

123123
strategy:
124124
matrix:
125-
php-versions: ['8.1', '8.2', '8.3']
125+
php-versions: ['8.1', '8.2', '8.4']
126126
include:
127127
- php-versions: '8.3'
128128
coverage: true

apps/files_external/tests/Storage/Amazons3MultiPartTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,4 @@ protected function tearDown(): void {
4545
public function testStat() {
4646
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
4747
}
48-
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();
55-
}
5648
}

apps/files_external/tests/Storage/Amazons3Test.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
* @package OCA\Files_External\Tests\Storage
1919
*/
2020
class Amazons3Test extends \Test\Files\Storage\Storage {
21-
private $config;
21+
protected $config;
2222
/** @var AmazonS3 */
2323
protected $instance;
2424

2525
protected function setUp(): void {
2626
parent::setUp();
2727

2828
$this->config = include('files_external/tests/config.amazons3.php');
29-
if (! is_array($this->config) or ! $this->config['run']) {
29+
if (!is_array($this->config) || !$this->config['run']) {
3030
$this->markTestSkipped('AmazonS3 backend not configured');
3131
}
3232
$this->instance = new AmazonS3($this->config);
@@ -43,11 +43,4 @@ protected function tearDown(): void {
4343
public function testStat() {
4444
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
4545
}
46-
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();
52-
}
5346
}

apps/files_external/tests/Storage/VersionedAmazonS3Test.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,12 @@ protected function setUp(): void {
2626
$this->markTestSkipped("s3 backend doesn't seem to support versioning");
2727
}
2828
}
29+
30+
public function testCopyOverWriteDirectory(): void {
31+
if (isset($this->config['minio'])) {
32+
$this->markTestSkipped('MinIO has a bug with batch deletion on versioned storages, see https://github.com/minio/minio/issues/21366');
33+
}
34+
35+
parent::testCopyOverWriteDirectory();
36+
}
2937
}

0 commit comments

Comments
 (0)