Skip to content
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:

  1. create a new database with data at c:/data/NoRMAuth/ (mongod —dbpath c:/data/NoRMAuth/)
  2. connect to the dabase
  3. use admin;
  4. db.addUser(‘admin’, ‘admin’);
  5. use main;
  6. db.addUser(‘usr’, ‘pss’);