From 2586669c96f63ea942b7e52a551d6a4c0bfa8e48 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sun, 30 Jun 2024 21:04:20 +0200 Subject: [PATCH] Delete skeleton dir when container starts --- tests/Fileshare/08-skeleton.sh | 5 +++++ tests/Fileshare/docker-compose.yml | 1 + tests/FileshareTestCase.php | 4 ++++ 3 files changed, 10 insertions(+) create mode 100755 tests/Fileshare/08-skeleton.sh diff --git a/tests/Fileshare/08-skeleton.sh b/tests/Fileshare/08-skeleton.sh new file mode 100755 index 00000000..a32660cd --- /dev/null +++ b/tests/Fileshare/08-skeleton.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +rm -R /var/www/owncloud/core/skeleton/* + +true diff --git a/tests/Fileshare/docker-compose.yml b/tests/Fileshare/docker-compose.yml index 88109d03..ccf241c0 100644 --- a/tests/Fileshare/docker-compose.yml +++ b/tests/Fileshare/docker-compose.yml @@ -27,6 +27,7 @@ services: retries: 5 volumes: - ./oc_tmp/files:/mnt/data + - ./08-skeleton.sh:/etc/entrypoint.d/08-skeleton.sh mariadb: image: mariadb:10.11 diff --git a/tests/FileshareTestCase.php b/tests/FileshareTestCase.php index 7445cfe7..5aa51f15 100644 --- a/tests/FileshareTestCase.php +++ b/tests/FileshareTestCase.php @@ -61,6 +61,10 @@ abstract class FileshareTestCase extends TestCase $adapter->deleteDirectory($directory); } + foreach ($adapter->files('/') as $file) { + $adapter->delete($file); + } + foreach ($dirs as $dir) { $adapter->makeDirectory($dir); }