mardi 24 avril 2018

Heroku tests started failing overnight? (cannot configure sandbox)

I’m getting a strange error when my tests run on Heroku which wasn’t happening on Friday, everything is fine locally.

-----> Running test command `mix test`...
  08:29:52.761 [info] Already up
  08:29:53.389 [info] seeding in prod environment
  08:29:53.389 [info] runing default seeds
  All departments inserted

  ** (RuntimeError) cannot configure sandbox with pool DBConnection.Poolboy.
  To use the SQL Sandbox, configure your repository pool as:
  pool: Ecto.Adapters.SQL.Sandbox
  (ecto) lib/ecto/adapters/sql/sandbox.ex:429: Ecto.Adapters.SQL.Sandbox.mode/2
  (elixir) lib/code.ex:376: Code.require_file/2
  (elixir) lib/enum.ex:675: Enum."-each/2-lists^foreach/1-0-"/2
  (elixir) lib/enum.ex:675: Enum.each/2
  (mix) lib/mix/tasks/test.ex:229: Mix.Tasks.Test.run/1
-----> test command `mix test` failed with exit status 1

No changes to test config in months…

# Configure your database
config :ev2, Ev2.Repo,
  adapter: Ecto.Adapters.Postgres,
  username: "postgres",
  password: "postgres",
  database: "ev2_timecards_test",
  hostname: "localhost",
  pool: Ecto.Adapters.SQL.Sandbox

app.json currently looks like this:

"environments": {
"test": {
  "env": {
    "IS_STAGING": {
      "required": false
    }
  },
  "addons":[
    "heroku-postgresql:hobby-dev",
    "heroku-redis:hobby-dev"
  ],
  "scripts": {
    "test-setup": "mix ecto.migrate",
    "test": "mix test",
    "postdeploy": "bash <(curl -s https://codecov.io/bash)"
  }
}

}

Running with Phoenix 1.3.

I wonder if anyone is facing this on Monday morning or if anyone has any suggestions?

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire