summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_request_test.cpp
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-09-19 16:45:33 -0400
committerMaria van Keulen <maria@mongodb.com>2017-09-19 16:45:33 -0400
commit469e035efb09fe7c59579e00796d4f6d429fb434 (patch)
treefe01aa78d0a49b9564446ae61c35a39b7125fd0c /src/mongo/db/query/query_request_test.cpp
parentb35c6fc183c26bc8a6d7cdfc8f5b970f90d60b56 (diff)
downloadmongo-469e035efb09fe7c59579e00796d4f6d429fb434.tar.gz
Revert "SERVER-30933 Change invariant to uassert for invalid uuid in queries"
This reverts commit 3eedd24bb8448e9a491a03d8eaa21999d4ea9405.
Diffstat (limited to 'src/mongo/db/query/query_request_test.cpp')
-rw-r--r--src/mongo/db/query/query_request_test.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/mongo/db/query/query_request_test.cpp b/src/mongo/db/query/query_request_test.cpp
index 5fde88e0e22..a838cfd1882 100644
--- a/src/mongo/db/query/query_request_test.cpp
+++ b/src/mongo/db/query/query_request_test.cpp
@@ -32,14 +32,11 @@
#include <boost/optional.hpp>
#include <boost/optional/optional_io.hpp>
-#include "mongo/db/catalog/collection_mock.h"
-#include "mongo/db/catalog/uuid_catalog.h"
#include "mongo/db/dbmessage.h"
#include "mongo/db/json.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/pipeline/aggregation_request.h"
#include "mongo/db/query/query_request.h"
-#include "mongo/db/service_context_noop.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
@@ -1421,22 +1418,5 @@ TEST(QueryRequestTest, ParseFromLegacyQueryTooNegativeNToReturn) {
.getStatus());
}
-TEST(QueryRequestTest, ParseFromUUID) {
- ServiceContextNoop service;
- auto client = service.makeClient("test");
- auto opCtxNoop = client->makeOperationContext();
- auto opCtx = opCtxNoop.get();
- // Register a UUID/Collection pair in the UUIDCatalog.
- const CollectionUUID uuid = UUID::gen();
- const NamespaceString nss("test.testns");
- Collection coll(stdx::make_unique<CollectionMock>(nss));
- UUIDCatalog& catalog = UUIDCatalog::get(opCtx);
- catalog.onCreateCollection(opCtx, &coll, uuid);
- QueryRequest qr(uuid);
- // Ensure a call to refreshNSS succeeds.
- qr.refreshNSS(opCtx);
- ASSERT_EQ(nss, qr.nss());
-}
-
} // namespace mongo
} // namespace