moodle-auth_saml2 icon indicating copy to clipboard operation
moodle-auth_saml2 copied to clipboard

Behat tests failing on 4.3 and 4.4 branch

Open danmarsden opened this issue 1 year ago • 1 comments

behat tests are failing in Moodle 4.3 and 4.4 with our latest code.

danmarsden avatar May 16 '24 23:05 danmarsden

I ran into this https://github.com/catalyst/moodle-auth_saml2/actions/runs/10764968618?pr=833 where every run in PHP 8.2+ the behat would fail. Investigating the logs, it seems behat is failing to connect:

Behat requirement not satisfied: http://localhost:8000 is not available, ensure you specified correct url and that the server is set up and started.
...
Facebook\WebDriver\Exception\UnknownErrorException: unknown error: net::ERR_CONNECTION_REFUSED

This is the behat code from the moodle plugin ci that is running related to starting the behat server:

https://github.com/moodlehq/moodle-plugin-ci/blob/f722b93722902e4fc496fe2afa00e03230107f9f/src/Command/BehatCommand.php#L108

Specifically, we can see the selenium image is pulled successfully, however there is no indication about the server status either way (good or bad).

I have a suspicion this is being caused by the symfony deprecations that pop up in the 8.2 pipelines but not the lower ones. E.g.:

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilterIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/moodle-auth_saml2/moodle-auth_saml2/m-ci/vendor/symfony/finder/Iterator/FilterIterator.php on line 32

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/moodle-auth_saml2/moodle-auth_saml2/m-ci/vendor/symfony/finder/Iterator/FilenameFilterIterator.php on line 28

Deprecated: Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/runner/work/moodle-auth_saml2/moodle-auth_saml2/m-ci/vendor/symfony/finder/Iterator/PathFilterIterator.php on line 27

Interestingly, the tests and behat work and pass on my local php 8.2 instance with Moodle master and there are also no deprecation messages, not sure what the difference between my local and GHA is though.

matthewhilton avatar Sep 09 '24 04:09 matthewhilton

Have been working on a Moodle 404+ branch, with a bump to simplesamlphp https://github.com/catalyst/moodle-auth_saml2/tree/support_moodle_4.5

Tests that have run on that, php 8.1 and php 8.3 tests are failing on the 404 version of moodle, but both sets pass on 405 moodle. Logs I looked through had that same Facebook error @matthewhilton posted earlier, they also pass on my local like Matt mentioned.

jay-oswald avatar Nov 29 '24 03:11 jay-oswald

closing - 404_Stable and higher now passing tests.

danmarsden avatar Apr 16 '25 05:04 danmarsden