Clean up container on connection failure, switch to ory/dockertest on package postgresql (#5050)

This commit is contained in:
Calvin Leung Huang
2018-08-07 09:56:33 -07:00
committed by Brian Kassouf
parent 6977aa70f1
commit ece7569aca
6 changed files with 58 additions and 75 deletions

View File

@@ -53,6 +53,7 @@ func preparePostgresTestContainer(t *testing.T) (cleanup func(), retURL string)
defer db.Close()
return db.Ping()
}); err != nil {
cleanup()
t.Fatalf("Could not connect to PostgreSQL docker container: %s", err)
}