[TOOLS][TESTS] Make tests run as www-data

This commit is contained in:
Hugo Sales 2021-05-05 12:44:34 +00:00
parent fc9b934bbc
commit ffa3774c46
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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