Closed nelsonic closed 5 years ago
Run the following commands in your terminal:
psql -U postgres -c 'DROP DATABASE IF EXISTS append_dev;'
psql -U postgres -c 'DROP DATABASE IF EXISTS append_test;'
mix ecto.create
mix test
MIX_ENV=test mix cover
You should see:
i.e. tests pass.
(I was making sure everything was working on localhost
before tackling #17 ... 😉)
A year later, I'm seeing the same error in a different project and I'm grateful to my past self for creating this issue with the solution. (first result on Google in incognito) 😻
In Phoenix 1.5.1
it's just:
psql -U postgres -c 'DROP DATABASE IF EXISTS app_dev;'
psql -U postgres -c 'DROP DATABASE IF EXISTS app_test;'
mix test
Because now the mix test
includes:
test: ["ecto.create --quiet", "ecto.migrate", "test"]
I'm grateful to your past self for creating this issue, too, @nelsonic
@jbosse stoked you found it helpful. 🎉
While attempting to run the tests on
localhost
I got the following error:Someone who has only just cloned the repo and installed the deps is unlikely to see this error because they won't have a duplicate project in the same namespace the way I do ... https://github.com/nelsonic/append-only-log-ex
I need to
DROP
the database and re-create it.