diff options
author | Ian Boros <puppyofkosh@gmail.com> | 2019-05-13 18:19:38 -0400 |
---|---|---|
committer | Ian Boros <puppyofkosh@gmail.com> | 2019-05-20 15:50:22 -0400 |
commit | 31967340abb31476910730163c04782f2e915d01 (patch) | |
tree | e21db441abdfbdf707f66f640796e3d8ee6ab6a8 /jstests/change_streams | |
parent | 24760ca934a3c7843731de117839070ddf7fd3cc (diff) | |
download | mongo-31967340abb31476910730163c04782f2e915d01.tar.gz |
SERVER-40949 add LookupAllowed stage constraint
This bans $merge and $sB from $lookup subpipelines
Diffstat (limited to 'jstests/change_streams')
-rw-r--r-- | jstests/change_streams/ban_from_lookup.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/jstests/change_streams/ban_from_lookup.js b/jstests/change_streams/ban_from_lookup.js index 08bc600ad55..b799c3ce169 100644 --- a/jstests/change_streams/ban_from_lookup.js +++ b/jstests/change_streams/ban_from_lookup.js @@ -13,9 +13,8 @@ assert.writeOK(coll.insert({_id: 1})); // Verify that we cannot create a $lookup using a pipeline which begins with $changeStream. - assertErrorCode(coll, - [{$lookup: {from: foreignColl, as: 'as', pipeline: [{$changeStream: {}}]}}], - ErrorCodes.IllegalOperation); + assertErrorCode( + coll, [{$lookup: {from: foreignColl, as: 'as', pipeline: [{$changeStream: {}}]}}], 51047); // Verify that we cannot create a $lookup if its pipeline contains a sub-$lookup whose pipeline // begins with $changeStream. @@ -31,5 +30,5 @@ ] } }], - ErrorCodes.IllegalOperation); + 51047); })(); |