summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2018-07-26 16:00:20 -0400
committerNick Zolnierz <nicholas.zolnierz@mongodb.com>2018-08-02 12:23:03 -0400
commitafbe688f0f18c5cb474fb1bcd933d6e06c0c5291 (patch)
treea7c1a3192f335c5e2947e395159eaa03782c3a50 /src/mongo/db/repl
parentafaf46687eb3930ddbfc8b528bd68295b6a09676 (diff)
downloadmongo-afbe688f0f18c5cb474fb1bcd933d6e06c0c5291.tar.gz
SERVER-35896: Support 'replaceDocuments' mode in $out
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r--src/mongo/db/repl/idempotency_update_sequence_test.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mongo/db/repl/idempotency_update_sequence_test.cpp b/src/mongo/db/repl/idempotency_update_sequence_test.cpp
index b9a251dabbb..11797d5a6a6 100644
--- a/src/mongo/db/repl/idempotency_update_sequence_test.cpp
+++ b/src/mongo/db/repl/idempotency_update_sequence_test.cpp
@@ -126,8 +126,7 @@ TEST(UpdateGenTest, UpdatesHaveValidPaths) {
FAIL(sb.str());
}
- std::set<std::string> argPaths;
- updateArg.getFieldNames(argPaths);
+ auto argPaths = updateArg.getFieldNames<std::set<std::string>>();
std::set<std::string> correctPaths{"a", "b", "a.0", "a.b", "b.0"};
for (auto path : argPaths) {
FieldRef pathRef(path);
@@ -165,8 +164,7 @@ TEST(UpdateGenTest, UpdatesAreNotAmbiguous) {
sb << "The generated update is not a $set or $unset BSONObj: " << update;
FAIL(sb.str());
}
- std::set<std::string> argPathsSet;
- updateArg.getFieldNames(argPathsSet);
+ auto argPathsSet = updateArg.getFieldNames<std::set<std::string>>();
std::vector<std::unique_ptr<FieldRef>> argPathsRefVec;
FieldRefSet pathRefSet;
@@ -211,8 +209,7 @@ TEST(UpdateGenTest, UpdatesPreserveDepthConstraint) {
setElem = update["$set"];
BSONObj updateArg = setElem.Obj();
- std::set<std::string> argPaths;
- updateArg.getFieldNames(argPaths);
+ auto argPaths = updateArg.getFieldNames<std::set<std::string>>();
for (auto path : argPaths) {
auto pathDepth = getPathDepth_forTest(path);
auto particularSetArgument = updateArg[path];