diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-11-22 23:19:18 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-11-22 23:19:18 -0500 |
commit | 55579ea13671c81508dea967a8053a73f3d03856 (patch) | |
tree | 019d2a42bb3e7b971e9d7a0d804f5c249a857977 /jstests/sharding/features1.js | |
parent | 6d745c7834558a030ebcc9e3ea9fc604f744987d (diff) | |
download | mongo-55579ea13671c81508dea967a8053a73f3d03856.tar.gz |
test for unique indexes and gle
Diffstat (limited to 'jstests/sharding/features1.js')
-rw-r--r-- | jstests/sharding/features1.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/sharding/features1.js b/jstests/sharding/features1.js index 05b8b8cef08..766e4a3b933 100644 --- a/jstests/sharding/features1.js +++ b/jstests/sharding/features1.js @@ -105,6 +105,14 @@ assert.eq( 2 , b.foo4.getIndexes().length , "ub2" ); assert( a.foo4.getIndexes()[1].unique , "ua3" ); assert( b.foo4.getIndexes()[1].unique , "ub3" ); +assert.eq( 2 , db.foo4.count() , "uc1" ) +db.foo4.save( { num : 7 } ) +assert.eq( 3 , db.foo4.count() , "uc2" ) +db.foo4.save( { num : 7 } ) +gle = db.getLastErrorObj(); +assert( gle.err , "uc3" ) +assert.eq( 3 , db.foo4.count() , "uc4" ) + // --- don't let you convertToCapped ---- assert( ! db.foo4.isCapped() , "ca1" ); assert( ! a.foo4.isCapped() , "ca2" ); |