diff options
author | Arun Banala <arun.banala@mongodb.com> | 2020-11-02 18:09:28 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-07 20:04:53 +0000 |
commit | c8ddb496f147e5a977eb668247b81da313d06e1d (patch) | |
tree | 34ba0cc443ec6294c5585d0951d5430cc69349e2 /src/mongo/s/sharding_router_test_fixture.cpp | |
parent | d0cfd1d0c0fcfd75525a8d8f3a050876bc9d1e40 (diff) | |
download | mongo-c8ddb496f147e5a977eb668247b81da313d06e1d.tar.gz |
SERVER-51619 Convert find command input to IDL
Diffstat (limited to 'src/mongo/s/sharding_router_test_fixture.cpp')
-rw-r--r-- | src/mongo/s/sharding_router_test_fixture.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/s/sharding_router_test_fixture.cpp b/src/mongo/s/sharding_router_test_fixture.cpp index 04c652dcd8d..670620bf52e 100644 --- a/src/mongo/s/sharding_router_test_fixture.cpp +++ b/src/mongo/s/sharding_router_test_fixture.cpp @@ -255,10 +255,9 @@ void ShardingTestFixture::expectGetShards(const std::vector<ShardType>& shards) const NamespaceString nss(request.dbname, request.cmdObj.firstElement().String()); ASSERT_EQ(nss, ShardType::ConfigNS); - auto queryResult = QueryRequest::makeFromFindCommand(nss, request.cmdObj, false); - ASSERT_OK(queryResult.getStatus()); - - const auto& query = queryResult.getValue(); + // If there is no '$db', append it. + auto cmd = OpMsgRequest::fromDBAndBody(nss.db(), request.cmdObj).body; + auto query = QueryRequest::makeFromFindCommand(cmd, false, nss); ASSERT_EQ(query->nss(), ShardType::ConfigNS); ASSERT_BSONOBJ_EQ(query->getFilter(), BSONObj()); |