Skip to content

Commit

Permalink
fix: test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
davidebianchi committed Nov 14, 2024
1 parent 58ebdb3 commit 8f3bea3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/testutils/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ func MongoCollection(t *testing.T, mongoURL, collection, db string) *mongo.Colle
coll := client.Database(db).Collection(collection)

t.Cleanup(func() {
// err := coll.Drop(context.Background())
// require.NoError(t, err)
// err = client.Database(db).Drop(ctx)
// require.NoError(t, err)
err := coll.Drop(context.Background())
require.NoError(t, err)
err = client.Database(db).Drop(ctx)
require.NoError(t, err)
err = client.Disconnect(ctx)
require.NoError(t, err)
})
Expand Down

0 comments on commit 8f3bea3

Please sign in to comment.