moodlehq / moodle-docker

A docker environment for moodle developers
GNU General Public License v3.0
373 stars 244 forks source link

Behat failing on moodle 4.0 / current master #207

Closed PhMemmel closed 1 year ago

PhMemmel commented 2 years ago

I've tried to run behat test with a clean moodle repository with master branch

I set MOODLE_DOCKER_WWWROOT to the moodle repo and MOODLE_DOCKER_DB to mariadb.

Running behatinit is working perfectly. However, running bin/moodle-docker-compose exec -u www-data webserver php admin/tool/behat/cli/run.php --tags=@block_search_forums (just an example tag) leads to:

Running single behat site:
Behat requirement not satisfied: http://webserver is not available, ensure you specified correct url and that the server is set up and started.
 More info in https://docs.moodle.org/dev/Running_acceptance_test

To re-run failed processes, you can use following command:
php admin/tool/behat/cli/run.php --tags="@block_search_forums" --rerun

This seems to be related to moodle 4.0. Switching to MOODLE_311_STABLE, rerunning behat init and executing the command above everything works without a problem.

stronk7 commented 1 year ago

Uhm, @PhMemmel ,

have you you got it working? Sorry for the late reply but I cannot find anything causing that problem and both CI and local runs say this is working with 400 and 4.1dev (master) perfectly.

If there is any other detail able to make us reproduce the problem, great, but right now it seems that everything is working ok, so far.

Ciao :-)

PhMemmel commented 1 year ago

Hi @stronk7, thank you picking up on this. I managed to get it back to work and simply forgot to close this issue, sorry for that. Unfortunately, too much time has passed since then so I do not really remember how I fixed it, but it was nothing related to the docker repo. Again thx and sry, Issue closed.

stronk7 commented 1 year ago

Thanks!

mackensen commented 1 year ago

I saw this on current master with a custom-compiled PHP 8.2 container from #248. Moodle (or its support packages) throws a lot of notices on 8.2. Swapping in a PHP 8.0 container resolved the issue.

scara commented 1 year ago

Hi @mackensen, could https://github.com/moodlehq/moodle-php-apache/issues/174 be of any help?

Shortly a recent change in the PHP base image requires the user to be specified when creating soft links in the container: -u www-data.

HTH, Matteo

stronk7 commented 1 year ago

Also, note that Moodle still doesn't support php82, it's WIP @ https://tracker.moodle.org/browse/MDL-76405