elixir-sqlite / ecto_sqlite3

An Ecto SQLite3 adapter.
https://hexdocs.pm/ecto_sqlite3
MIT License
288 stars 43 forks source link

Phoenix LiveView and generated tests fail #132

Closed lindem closed 11 months ago

lindem commented 11 months ago

I have tried the following:

mix phx.new --database sqlite3 --live throwaway
cd throwaway
# create some entity in the db with associates liveviews
mix phx.gen.live Things Thing thing thingvalue:integer thingdescription:string
# copy routes into router.ex
mix test

The generated tests fail. I do not know how to debug them, as I have not touched the code at all after generating it.

This forum thread explores the issue: https://elixirforum.com/t/sqlite3-workaround-for-the-testing-sandbox/58915/6 I may have misunderstood the documented issue with the Ecto sandbox, seeing as the tests are apparently not generated async.

I do not know if this issue is filed in the correct place, but apparently other database adapters are having the same issue.

Thanks for reading!

lindem commented 11 months ago

It seems that the problem occurs because table names must be pluralized for the generators to work properly. My bad.

warmwaffles commented 11 months ago

Not a problem, easy to over look phoenix.