summaryrefslogtreecommitdiff
path: root/jstests/sharding/update1.js
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2010-05-14 14:29:41 -0400
committerMathias Stearn <mathias@10gen.com>2010-05-14 14:30:40 -0400
commitaf9848aef93d664e3887eb255b2e388ec7aa92ff (patch)
tree04e2a1a93e7761febcb930b6aeefd49c870f2710 /jstests/sharding/update1.js
parent4b79590e83607926bfccd4dc3277796d1f26aedf (diff)
downloadmongo-af9848aef93d664e3887eb255b2e388ec7aa92ff.tar.gz
Require update object to have full shard key.
Diffstat (limited to 'jstests/sharding/update1.js')
-rw-r--r--jstests/sharding/update1.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/sharding/update1.js b/jstests/sharding/update1.js
index 8a96f3c3b08..63d4bf6671d 100644
--- a/jstests/sharding/update1.js
+++ b/jstests/sharding/update1.js
@@ -21,9 +21,11 @@ coll.save({_id:1, key:1, other:1});
// update existing using update()
coll.update({_id:2}, {key:2, other:2});
-//coll.update({_id:3, key:3}, {other:3}); //should add key to new object (doesn't work yet)
coll.update({_id:3}, {key:3, other:3});
+coll.update({_id:3, key:3}, {other:4});
+assert.eq(db.getLastErrorObj().code, 12376, 'bad update error');
+
assert.eq(coll.count(), 3, "count B")
coll.find().forEach(function(x){
assert.eq(x._id, x.key, "_id == key");