test: reenable localstack tests (bug fixed) but disable MinIO versioned copy test

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/53378/head
Ferdinand Thiessen 4 months ago
parent 22b9d912b1
commit 5f200c7765
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
  1. 8
      .github/workflows/files-external-s3.yml
  2. 8
      apps/files_external/tests/Storage/Amazons3MultiPartTest.php
  3. 11
      apps/files_external/tests/Storage/Amazons3Test.php
  4. 8
      apps/files_external/tests/Storage/VersionedAmazonS3Test.php

@ -45,9 +45,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
php-versions: ['8.1', '8.2', '8.4']
include:
- php-versions: '8.2'
- php-versions: '8.3'
coverage: ${{ github.event_name != 'pull_request' }}
name: php${{ matrix.php-versions }}-s3-minio
@ -88,7 +88,7 @@ jobs:
composer install
./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
./occ app:enable --force files_external
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
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
- name: Wait for S3
run: |
@ -134,7 +134,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.1', '8.2', '8.4']
include:
- php-versions: '8.3'
coverage: ${{ github.event_name != 'pull_request' }}

@ -46,12 +46,4 @@ class Amazons3MultiPartTest extends \Test\Files\Storage\Storage {
public function testStat(): void {
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
}
public function testHashInFileName(): void {
if (isset($this->config['localstack'])) {
$this->markTestSkipped('Localstack has a bug with hashes in filename');
}
parent::testHashInFileName();
}
}

@ -19,7 +19,7 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
* @package OCA\Files_External\Tests\Storage
*/
class Amazons3Test extends \Test\Files\Storage\Storage {
private $config;
protected $config;
/** @var AmazonS3 */
protected $instance;
@ -27,7 +27,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage {
parent::setUp();
$this->config = include('files_external/tests/config.amazons3.php');
if (! is_array($this->config) or ! $this->config['run']) {
if (!is_array($this->config) || !$this->config['run']) {
$this->markTestSkipped('AmazonS3 backend not configured');
}
$this->instance = new AmazonS3($this->config);
@ -44,11 +44,4 @@ class Amazons3Test extends \Test\Files\Storage\Storage {
public function testStat(): void {
$this->markTestSkipped('S3 doesn\'t update the parents folder mtime');
}
public function testHashInFileName(): void {
if (isset($this->config['localstack'])) {
$this->markTestSkipped('Localstack has a bug with hashes in filename');
}
parent::testHashInFileName();
}
}

@ -26,4 +26,12 @@ class VersionedAmazonS3Test extends Amazons3Test {
$this->markTestSkipped("s3 backend doesn't seem to support versioning");
}
}
public function testCopyOverWriteDirectory(): void {
if (isset($this->config['minio'])) {
$this->markTestSkipped('MinIO has a bug with batch deletion on versioned storages, see https://github.com/minio/minio/issues/21366');
}
parent::testCopyOverWriteDirectory();
}
}

Loading…
Cancel
Save