mirror of
https://github.com/chatmail/relay.git
synced 2026-06-09 21:21:09 +00:00
wip
This commit is contained in:
@@ -15,19 +15,19 @@ dovecot = {
|
||||
|
||||
-- Tests for testing the lua<->python interaction
|
||||
|
||||
function test_passdb_verify_ok(user, password)
|
||||
local res, extra = auth_passdb_verify({user=user}, password)
|
||||
function test_password_verify_ok(user, password)
|
||||
local res, extra = auth_password_verify({user=user}, password)
|
||||
assert(res==dovecot.auth.PASSDB_RESULT_OK)
|
||||
assert(extra.uid == "vmail")
|
||||
assert(extra.gid == "vmail")
|
||||
-- assert(extra.homedir == "/home/vmail/link2xt")
|
||||
print("OK test_passdb_verify_ok "..user.." "..password)
|
||||
print("OK test_password_verify_ok "..user.." "..password)
|
||||
end
|
||||
|
||||
function test_passdb_verify_mismatch(user, password)
|
||||
local res = auth_passdb_verify({user=user}, password)
|
||||
function test_password_verify_mismatch(user, password)
|
||||
local res = auth_password_verify({user=user}, password)
|
||||
assert(res == dovecot.auth.PASSDB_RESULT_PASSWORD_MISMATCH)
|
||||
print("OK test_passdb_verify_mismatch "..user.." "..password)
|
||||
print("OK test_password_verify_mismatch "..user.." "..password)
|
||||
end
|
||||
|
||||
function test_userdb_lookup_ok(user)
|
||||
@@ -67,8 +67,8 @@ function test_split_chatctl()
|
||||
end
|
||||
|
||||
test_split_chatctl()
|
||||
test_passdb_verify_ok("link2xt@instant2.testrun.org", "Ahyei6ie")
|
||||
test_passdb_verify_mismatch("link2xt@instant2.testrun.org", "Aqwlek")
|
||||
test_password_verify_ok("link2xt@instant2.testrun.org", "Ahyei6ie")
|
||||
test_password_verify_mismatch("link2xt@instant2.testrun.org", "Aqwlek")
|
||||
test_userdb_lookup_ok("link2xt@instant2.testrun.org")
|
||||
test_userdb_lookup_mismatch("wlekqjlew@xyz.org")
|
||||
test_passdb_lookup_ok("link2xt@instant2.testrun.org")
|
||||
|
||||
Reference in New Issue
Block a user