Closed muety closed 2 months ago
Hi @muety, a test seems to be consistently failing. https://github.com/muety/wakapi/actions/runs/9889197240/job/27314711747
There is possibly a race condition, in that the container may not be ready before the tests are executed.
With sleep 2
locally, I get the same error as in CI.
Without sleep locally:
Running tests ...
ok github.com/muety/wakapi/services/mail 0.340s
In https://github.com/muety/wakapi/commit/a5565b12ea11f0ef62214eb43a60b0b24c37a864 I added integration tests for SMTP mail sending using smtp4dev. Tests are run as part of the standard test suite, but are skipped silently if no smtp4dev endpoint is available. Running the tests requires to bring up a Docker container for smtp4dev, which is why currently these tests can only be run manually for simplicity. However, SMTP tests should be configured as part of the GHA workflow, too. Should be quite straightforward and similar to how we run the API tests against different DBs (running in Docker). Perhaps something for you, @YC?