You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the tests, I get randomly errors like this:
1) App\Tests\IntegrationTests\Api\Audiosus\CanConnectTest::testCanConnectFalse
Symfony\Component\HttpClient\Exception\ClientException: An error occurred
Unable to find the controller for path "/api/auth". The route is wrongly configured.
/srv/app/vendor/api-platform/core/src/Symfony/Bundle/Test/Response.php:80
/srv/app/vendor/api-platform/core/src/Symfony/Bundle/Test/Response.php:94
/srv/app/vendor/api-platform/core/src/Symfony/Bundle/Test/Response.php:125
/srv/app/tests/IntegrationTests/Api/XY/CanConnectTest.php:33
2) App\Tests\IntegrationTests\Api\XY\CanConnectTest::testCanConnectTrue
Symfony\Component\HttpClient\Exception\ClientException: An error occurred
Unable to find the controller for path "/api/auth". The route is wrongly configured.
/srv/app/vendor/api-platform/core/src/Symfony/Bundle/Test/Response.php:80
/srv/app/vendor/api-platform/core/src/Symfony/Bundle/Test/Response.php:94
/srv/app/vendor/api-platform/core/src/Symfony/Bundle/Test/Response.php:125
/srv/app/tests/IntegrationTests/Api/XY/CanConnectTest.php:33
or sometimes all the test cases are green, or only one test fails.
Any ideas?
The text was updated successfully, but these errors were encountered:
4d4ch4u32
changed the title
Randomized "Unable to find the controller for path '/api/auth'" in Tests
Randomly "Unable to find the controller for path '/api/auth'" in Tests
Sep 24, 2024
This is exactly what I am currently struggling with too. I noticed that it is depends on the order in which the tests are run. After running a test expection an 4xx error all following tests will fail with the The route is wrongly configured error.
I was unable to trace it back to root cause, but it looked like the Request object does not contain the _controller attribute (or it is not resolved correctly) resulting in this error.
Hello,
I'm using the bundle in a API platform project for auth. In my API tests, I use the configured login endpoint
/api/tests
.Bundle configuration:
The URL is also defined in my
routes.yaml
:This is my test class with 3 test cases:
When I run the tests, I get randomly errors like this:
or sometimes all the test cases are green, or only one test fails.
Any ideas?
The text was updated successfully, but these errors were encountered: