diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2017-12-08 17:09:42 -0500 |
---|---|---|
committer | Sara Golemon <sara.golemon@mongodb.com> | 2017-12-12 15:05:00 -0500 |
commit | 8cb7435be3529fb4f982ec53373db5ecd9ad4efb (patch) | |
tree | 61af444151d9ac9531ec479d1831271a2cf8425e /src/mongo/client/authenticate_test.cpp | |
parent | 143093d6a23b1b84274461bebb9e88e11b4f2a2f (diff) | |
download | mongo-8cb7435be3529fb4f982ec53373db5ecd9ad4efb.tar.gz |
SERVER-32275 Remove MONGODB-CR client support from monogd/mongos
Diffstat (limited to 'src/mongo/client/authenticate_test.cpp')
-rw-r--r-- | src/mongo/client/authenticate_test.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/client/authenticate_test.cpp b/src/mongo/client/authenticate_test.cpp index 7cfa42b4449..a486b37f131 100644 --- a/src/mongo/client/authenticate_test.cpp +++ b/src/mongo/client/authenticate_test.cpp @@ -178,17 +178,24 @@ public: }; TEST_F(AuthClientTest, MongoCR) { + // This test excludes the MONGODB-CR support found in mongo/shell/mongodbcr.cpp + // so it should fail to auth. + // jstests exist to ensure MONGODB-CR continues to work from the client. auto params = loadMongoCRConversation(); - auth::authenticateClient(std::move(params), HostAndPort(), "", _runCommandCallback); + ASSERT_THROWS( + auth::authenticateClient(std::move(params), HostAndPort(), "", _runCommandCallback), + DBException); } TEST_F(AuthClientTest, asyncMongoCR) { + // As with the sync version above, we expect authentication to fail + // since this test was built without MONGODB-CR support. auto params = loadMongoCRConversation(); auth::authenticateClient(std::move(params), HostAndPort(), "", _runCommandCallback, - [this](auth::AuthResponse response) { ASSERT(response.isOK()); }); + [this](auth::AuthResponse response) { ASSERT(!response.isOK()); }); } #ifdef MONGO_CONFIG_SSL |