Skip to content

Commit

Permalink
Migration test: added error check in TestMain
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoone committed Aug 26, 2019
1 parent 59a223e commit 2505d6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions migration_integration_test.go
Expand Up @@ -70,6 +70,9 @@ func TestMain(m *testing.M) {
addr, err := url.Parse(os.Getenv("MONGO_URL"))
opt := options.Client().ApplyURI(addr.String())
client, err := mongo.NewClient(opt)
if err != nil {
panic(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
err = client.Connect(ctx)
Expand Down

0 comments on commit 2505d6e

Please sign in to comment.