From 68ba30df2203e666d4af8e8f57d0bf0581f9d4ec Mon Sep 17 00:00:00 2001 From: Tim de Pater Date: Sat, 4 Jan 2025 17:04:06 +0100 Subject: [PATCH] Set smoketest Alpine Linux version to 3.21 and fix deprecated chown syntax --- docker-compose.test.yml | 2 +- entrypoint.sh | 2 +- run_tests.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.test.yml b/docker-compose.test.yml index f975598..237c8e0 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -21,7 +21,7 @@ services: FS_METHOD: direct sut: - image: alpine:3 + image: alpine:3.21 depends_on: - wordpress command: /tmp/run_tests.sh diff --git a/entrypoint.sh b/entrypoint.sh index 2561ec1..2e87dac 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,7 +8,7 @@ if [ ! "$(ls -A "/var/www/wp-content" 2>/dev/null)" ]; then echo 'Setting up wp-content volume' # Copy wp-content from Wordpress src to volume cp -r /usr/src/wordpress/wp-content /var/www/ - chown -R nobody.nobody /var/www + chown -R nobody:nobody /var/www fi # Check if wp-secrets.php exists if ! [ -f "/var/www/wp-content/wp-secrets.php" ]; then diff --git a/run_tests.sh b/run_tests.sh index 0acbab3..c23b0db 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -1,4 +1,4 @@ #!/usr/bin/env sh apk --no-cache add curl -while ! curl -fs wordpress > /dev/null; do echo -n '.'; sleep 1; done; -curl --silent --fail http://wordpress/wp-admin/install.php | grep 'wp-core-ui' > /dev/null +for i in $(seq 1 10); do curl -fs wordpress > /dev/null && break || { echo -n '.'; sleep 1; }; done; +curl --silent --fail http://wordpress/wp-admin/install.php | grep 'wp-core-ui'