diff options
author | Geert Bosch <geert@mongodb.com> | 2017-09-25 12:49:51 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2017-09-27 09:52:42 -0400 |
commit | 0a0a8bf93d88ce91629f8ee460e57d8bd56246e6 (patch) | |
tree | 7f3d8dfa7560fc4c8e17dba4f875fd438fbb970a /src/mongo/db/commands_test.cpp | |
parent | b81d9c960435f36cbd67ec592b5372d45199cf90 (diff) | |
download | mongo-0a0a8bf93d88ce91629f8ee460e57d8bd56246e6.tar.gz |
SERVER-31229 Commands return NamespaceNotFound on unknown UUID
Diffstat (limited to 'src/mongo/db/commands_test.cpp')
-rw-r--r-- | src/mongo/db/commands_test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/commands_test.cpp b/src/mongo/db/commands_test.cpp index 207d2faed18..b6cc5c622f8 100644 --- a/src/mongo/db/commands_test.cpp +++ b/src/mongo/db/commands_test.cpp @@ -113,8 +113,9 @@ TEST_F(ParseNsOrUUID, FailInvalidDbName) { TEST_F(ParseNsOrUUID, ParseUnknownUUID) { auto cmd = BSON("query" << UUID::gen()); - auto parsedNss = Command::parseNsOrUUID(opCtx, "test.coll", cmd); - ASSERT(parsedNss.isEmpty()); + ASSERT_THROWS_CODE(Command::parseNsOrUUID(opCtx, "test.coll", cmd), + DBException, + ErrorCodes::NamespaceNotFound); } TEST_F(ParseNsOrUUID, ParseValidColl) { |