summaryrefslogtreecommitdiff
path: root/client/examples/authTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/examples/authTest.cpp')
-rw-r--r--client/examples/authTest.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/examples/authTest.cpp b/client/examples/authTest.cpp
index 77ce12d..71cdd39 100644
--- a/client/examples/authTest.cpp
+++ b/client/examples/authTest.cpp
@@ -22,7 +22,7 @@
using namespace mongo;
int main( int argc, const char **argv ) {
-
+
const char *port = "27017";
if ( argc != 1 ) {
if ( argc != 3 )
@@ -37,17 +37,18 @@ int main( int argc, const char **argv ) {
throw -11;
}
- { // clean up old data from any previous tests
+ {
+ // clean up old data from any previous tests
conn.remove( "test.system.users" , BSONObj() );
}
conn.insert( "test.system.users" , BSON( "user" << "eliot" << "pwd" << conn.createPasswordDigest( "eliot" , "bar" ) ) );
-
+
errmsg.clear();
bool ok = conn.auth( "test" , "eliot" , "bar" , errmsg );
if ( ! ok )
cout << errmsg << endl;
- assert( ok );
+ MONGO_assert( ok );
- assert( ! conn.auth( "test" , "eliot" , "bars" , errmsg ) );
+ MONGO_assert( ! conn.auth( "test" , "eliot" , "bars" , errmsg ) );
}