warden
warden copied to clipboard
`mkdir()` Permissions with Allure
Expected Result
When Yandex\Allure\PhpUnit\AllurePhpUnit
is configured as per the documentation, PHPUnit tests results are saved to allure-results
without issues.
Actual Result
Warning: mkdir(): Permission denied in /opt/project/vendor/allure-framework/allure-phpunit/src/Yandex/Allure/PhpUnit/AllurePhpUnit.php:98.
Process finished with exit code 2
Notes
Have recreated my local environment using warden env down -v
, using both wardenenv/php-fpm:7.4-magento2-xdebug3
and wardenenv/php-fpm:7.4-magento2
images to run PHPUnit tests, etc.
I'm able to access https://allure.xxxxx.test/index.html without issues (where xxxxx
is the project name), and PHPUnit tests run completely fine, otherwise.
Adobe Commerce/Magento configuration:
2.4.3
Warden configuration:
BLACKFIRE_CLIENT_ID=
BLACKFIRE_CLIENT_TOKEN=
BLACKFIRE_SERVER_ID=
BLACKFIRE_SERVER_TOKEN=
COMPOSER_VERSION=2
ELASTICSEARCH_VERSION=7.9
MARIADB_VERSION=10.4
NODE_VERSION=10
PHP_VERSION=7.4
PHP_XDEBUG_3=1
RABBITMQ_VERSION=3.7
REDIS_VERSION=6.0
TRAEFIK_DOMAIN=xxxxx.test
TRAEFIK_SUBDOMAIN=app
VARNISH_VERSION=6.5
WARDEN_ALLURE=1
WARDEN_BLACKFIRE=0
WARDEN_DB=1
WARDEN_ELASTICSEARCH=1
WARDEN_ENV_NAME=xxxxx
WARDEN_ENV_TYPE=magento2
WARDEN_MAGEPACK=0
WARDEN_RABBITMQ=1
WARDEN_REDIS=1
WARDEN_SELENIUM=0
WARDEN_SELENIUM_DEBUG=0
WARDEN_SPLIT_CHECKOUT=0
WARDEN_SPLIT_SALES=0
WARDEN_SYNC_IGNORE=
WARDEN_TEST_DB=1
WARDEN_VARNISH=1
WARDEN_WEB_ROOT=/
Resources
- https://devdocs.magento.com/mftf/docs/reporting.html
- https://docs.qameta.io/allure/#_reporting
- https://docs.warden.dev/configuration/reporting.html
Also facing this issue.
Actually, I get that error if WARDEN_ALLURE=0
is set.
This I can work around with
sudo mkdir /var/allure-results
sudo chmod a+rwx /var/allure-results
When WARDEN_ALLURE=1
is set, I get this error:
Warning: unlink(/var/allure-results/executor.json): Permission denied in /var/www/html/vendor/allure-framework/allure-phpunit/src/Yandex/Allure/PhpUnit/AllurePhpUnit.php:105.
For this again re-setting the permissions with the following works around the issue:
sudo chmod a+rwx /var/allure-results
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.