Skip to content

Conversation

@razvanc92
Copy link

Added options when creating the Mongo connection and if user/pass is provided then it will auth.

@eberhara
Copy link
Member

eberhara commented Aug 3, 2017

@razvanc92 did you see the unit tests are failing?

  1) Mongration.Migration "before each" hook:
     Uncaught TypeError: Cannot read property 'pass' of undefined
      at MongoConnection.<anonymous> (src/utils/mongo-connection.js:26:24)
      at node_modules/mongodb/lib/mongo_client.js:406:11
      at _combinedTickCallback (internal/process/next_tick.js:73:7)
      at process._tickCallback (internal/process/next_tick.js:104:9)

Since options is not required, if(this.options.pass || this.options.user) will trigger that undefined on mongo-connection:26.

@razvanc92
Copy link
Author

@eberhara I fixed the error. If you have any other comments/recommendations just let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants