add mongo test case: auth

This commit is contained in:
LiuYang
2018-08-30 11:38:08 +08:00
committed by 云风
parent 7e63080c03
commit ce0cdc7bd3
4 changed files with 52 additions and 1 deletions

View File

@@ -309,7 +309,7 @@ end
function mongo_db:auth(user, pass)
local authmod = rawget(self.connection, "authmod") or "scram_sha1"
local auth_func = auth_method[authmod]
local auth_func = auth_method["auth_" .. authmod]
assert(auth_func , "Invalid authmod")
return auth_func(self, user, pass)
end