Set up testing
Is there any documentation on actually setting up testing? I want to test my resource before I begin trying to implement my ui, but I can't find how to create or run migrations for the "test" postgres db.
I'm new to elixir and phoenix in general so any direction on where to go to find this information would be appreciated.
My current test looks like
The error I get is in the image attached. This error leads me to believe I need to run migrations for my
open_budget_test
database but running mix ash_postgres.migrate open_budget_test
doesn't seem to do the trick.
Thanks again for any guidance.
4 Replies
you'll need to run migration sin the test env
MIX_ENV=test mix ash_postgres.migrate
Thank you, that is exactly what I needed. Where should I have looked for this information, is this a basic elixir thing, a phoenix thing, or what. I don't want to waste anyone's time with my newbie questions.
Well, its only kind of a basic elixir thing (the mix env part), but its tough because in Ash we wrap a library called Ecto and so a lot of people are familiar with those conventions and so we don't document them well.
This one probably should have been in our docs 🙂
Yeah, I'm sure I would not document it either if I was creating a library for a language I was familiar with. 🙂 Thank you very much for your help and kindness in your response. 🙂