Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SERVER-1534 SERVER-10911: enable curentDate/min/max mods
- Loading branch information
1 parent
e41385a
commit 278f1b4
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// Verify update mods exist | ||
t = db.update_mods; | ||
t.drop(); | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$set:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$unset:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$inc:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$mul:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$push:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$pushAll:{a:[1]}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$addToSet:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$pull:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$pop:{a:true}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$rename:{a:"b"}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$bit:{a:{and:NumberLong(1)}}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$currentDate:{a:true}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$max:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() | ||
|
||
t.save({_id:1}); | ||
t.update({}, {$min:{a:1}}) | ||
assert.automsg( "!db.getLastError()" ); | ||
t.remove() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters