summaryrefslogtreecommitdiff
path: root/jstests/repl/repl8.js
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-05-21 11:07:11 -0400
committerAaron <aaron@10gen.com>2009-05-21 11:07:11 -0400
commit7552a7ccb5426515e3f0b3001fad8cd4ada3d126 (patch)
treef73ce8840a7e9a3e8d3fce3ae31dfad9b54682fc /jstests/repl/repl8.js
parentf1ff2f1a57f466983b138024264b31ce6748be74 (diff)
downloadmongo-7552a7ccb5426515e3f0b3001fad8cd4ada3d126.tar.gz
fix op logging for collection creation and for convertToCapped
Diffstat (limited to 'jstests/repl/repl8.js')
-rw-r--r--jstests/repl/repl8.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/repl/repl8.js b/jstests/repl/repl8.js
index e7d1f12f54a..37d247d7bb5 100644
--- a/jstests/repl/repl8.js
+++ b/jstests/repl/repl8.js
@@ -15,3 +15,16 @@ assert.soon( function() { return s.getDB( baseName ).getCollection( "first" ).is
m.getDB( baseName ).createCollection( "second", {capped:true,size:1000} );
assert.soon( function() { return s.getDB( baseName ).getCollection( "second" ).isCapped(); } );
+
+m.getDB( baseName ).getCollection( "third" ).save( { a: 1 } );
+assert.soon( function() { return s.getDB( baseName ).getCollection( "third" ).exists(); } );
+assert.commandWorked( m.getDB( "admin" ).runCommand( {renameCollection:"jstests_repl_repl8.third", to:"jstests_repl_repl8.third_rename"} ) );
+assert( m.getDB( baseName ).getCollection( "third_rename" ).exists() );
+assert( !m.getDB( baseName ).getCollection( "third" ).exists() );
+assert.soon( function() { return s.getDB( baseName ).getCollection( "third_rename" ).exists(); } );
+assert.soon( function() { return !s.getDB( baseName ).getCollection( "third" ).exists(); } );
+
+m.getDB( baseName ).getCollection( "fourth" ).save( {a:1} );
+assert.commandWorked( m.getDB( baseName ).getCollection( "fourth" ).convertToCapped( 1000 ) );
+assert( m.getDB( baseName ).getCollection( "fourth" ).isCapped() );
+assert.soon( function() { return s.getDB( baseName ).getCollection( "fourth" ).isCapped(); } );