From ffa3774c460ce450e6893bd78a147b0a6f5a1cfa Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Wed, 5 May 2021 12:44:34 +0000 Subject: [PATCH] [TOOLS][TESTS] Make tests run as www-data --- docker/testing/Dockerfile | 2 +- docker/testing/coverage.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/testing/Dockerfile b/docker/testing/Dockerfile index 0f51fd1119..0fcb8fd0c4 100644 --- a/docker/testing/Dockerfile +++ b/docker/testing/Dockerfile @@ -3,6 +3,6 @@ FROM gsocial/php WORKDIR /var/www/social RUN apk update \ - && apk add --no-cache $PHPIZE_DEPS \ + && apk add --no-cache $PHPIZE_DEPS runuser \ && pecl install xdebug \ && docker-php-ext-enable xdebug diff --git a/docker/testing/coverage.sh b/docker/testing/coverage.sh index 6bd42f44ec..1f81e6f79e 100755 --- a/docker/testing/coverage.sh +++ b/docker/testing/coverage.sh @@ -4,7 +4,7 @@ cd /var/www/social || exit 65 yes yes | php bin/console doctrine:fixtures:load || exit 65 -if bin/phpunit --coverage-html .test_coverage_report; then +if runuser -u www-data -- bin/phpunit --coverage-html .test_coverage_report; then exit 64 else exit 65