Add full e2e phoenix app test
Here's a test setup that does e2e testing with a real phoenix app. This will be handy when testing more complex integrations like OTel stuff for a good start. It should also help us reduce the risk of introducing regressions in Phoenix apps (once we add more tests of course).
The only custom "trick" I had to use was defining endpoint in test/support because I made sentry depend on the phoenix_app from test/fixtures/phoenix_app and the endpoint needs access to Sentry.CapturePlug.
Another nice benefit is that we could set it up in the Sentry SDK project and it would make it simpler to test things out w/o having to create new setups manually.
Iām wondering if a better way to do this would be to instead have a Phoenix app in integration_tests or something, and then have a specific Mix task for testing that app (mix test in the app basically). That app can then depend on {:sentry, path: ".."}.
https://github.com/elixir-ecto/ecto_sql does all this setup and has been running it successfully for a while, so it could be a good source of inspiration.
@whatyouhide yeah this makes sense, thanks for suggestion!
==> Running tests for integration: phoenix_app ** (Mix) You're trying to run :phoenix_app on Elixir v1.13.4 but it has declared in its mix.exs file it supports only Elixir ~> 1.14 Integration tests for phoenix_app failed Error: Process completed with exit code 1.
So, what's our strategy here? Can we drop 1.13 support given that more recent Phoenix versions do not support it?
I made mix test skip running test.integrations when Elixir version is < 1.16 for the time being.
@whatyouhide thank you so much for all the suggestions! I applied all of it + rebased/squashed + updated #784 (which waits for reviews too šš»)