diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2018-08-27 13:06:38 -0400 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2018-08-29 16:47:09 -0400 |
commit | 4cb0742947dabee476c9979cae39c728a21568d5 (patch) | |
tree | 8ec6baacaab48a11b20eae4781f32be1bdad6ec2 /src/mongo/db/ops/write_ops_document_stream_integration_test.cpp | |
parent | aa36a9e8ad8c98e828f1b53966672b368d973380 (diff) | |
download | mongo-4cb0742947dabee476c9979cae39c728a21568d5.tar.gz |
SERVER-36015 Remove references to system.namespaces and system.indexes
Diffstat (limited to 'src/mongo/db/ops/write_ops_document_stream_integration_test.cpp')
-rw-r--r-- | src/mongo/db/ops/write_ops_document_stream_integration_test.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/mongo/db/ops/write_ops_document_stream_integration_test.cpp b/src/mongo/db/ops/write_ops_document_stream_integration_test.cpp index 51cbf103722..cb0c92c0536 100644 --- a/src/mongo/db/ops/write_ops_document_stream_integration_test.cpp +++ b/src/mongo/db/ops/write_ops_document_stream_integration_test.cpp @@ -66,39 +66,4 @@ TEST(WriteOpsDocSeq, InsertDocStreamWorks) { ASSERT_EQ(conn->count(ns.ns()), 5u); } -TEST(WriteOpsDocSeq, InsertDocStreamWorksWithSystemDotIndexes) { - std::string errMsg; - auto conn = std::unique_ptr<DBClientBase>( - unittest::getFixtureConnectionString().connect("integration_test", errMsg)); - uassert(ErrorCodes::SocketException, errMsg, conn); - - NamespaceString ns("test", "doc_seq"); - conn->dropCollection(ns.ns()); - ASSERT_EQ(conn->count(ns.ns()), 0u); - - OpMsgRequest request; - request.body = BSON("insert" - << "system.indexes" - << "$db" - << ns.db()); - request.sequences = {{"documents", - { - BSON("ns" << ns.ns() << "key" << BSON("x" << 1) << "name" - << "my_special_index"), - }}}; - - const auto reply = conn->runCommand(std::move(request)); - ASSERT_EQ(int(reply->getProtocol()), int(rpc::Protocol::kOpMsg)); - auto body = reply->getCommandReply(); - ASSERT_OK(getStatusFromCommandResult(body)); - ASSERT_EQ(body["n"].Int(), 1); - - auto indexes = conn->getIndexSpecs(ns.ns()); - ASSERT_EQ(indexes.size(), 2u); // my_special_index + _id - - indexes.sort([](auto&& l, auto&& r) { return l["name"].String() < r["name"].String(); }); - ASSERT_EQ(indexes.front()["name"].String(), "_id_"); - ASSERT_EQ(indexes.back()["name"].String(), "my_special_index"); -} - } // namespace mongo |