-
Notifications
You must be signed in to change notification settings - Fork 82
Passing Tests
darrencauthon edited this page Aug 13, 2010
·
3 revisions
Many tests require some type of setup. Largely due to past experience, the team has decided that many tests should hit a real mongod server in order to validate truly correct functioning. As such, most tests can be thought of, in a way, as integration tests.
Most tests should pass if you do the following two things:
- Have mongod running – the app.config or user.config can be used to specify the connection string.
- Have mongod on your path
The remaining tests require a database with users setup (mongod must be restarted the first time a user is added so that —auth mode can be enabled, this makes it hard to automate). To make these tests pass, you must:
- create a new database with data at c:/data/NoRMAuth/ (mongod —dbpath c:/data/NoRMAuth/)
- connect to the dabase
- use admin;
- db.addUser(‘admin’, ‘admin’);
- use main;
- db.addUser(‘usr’, ‘pss’);