mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 04:48:06 +00:00
make doveauth tests pass again
This commit is contained in:
@@ -8,7 +8,7 @@ end
|
|||||||
-- call out to python program to actually manage authentication for dovecot
|
-- call out to python program to actually manage authentication for dovecot
|
||||||
|
|
||||||
function chatctl_verify(user, password)
|
function chatctl_verify(user, password)
|
||||||
local cmd = "python3 /home/vmail/chatctl hexauth "..escape(user).." "..escape(password)
|
local cmd = "doveauth hexauth "..escape(user).." "..escape(password)
|
||||||
print("executing: "..cmd)
|
print("executing: "..cmd)
|
||||||
local handle = io.popen(cmd)
|
local handle = io.popen(cmd)
|
||||||
local result = handle:read("*a")
|
local result = handle:read("*a")
|
||||||
@@ -18,7 +18,7 @@ end
|
|||||||
|
|
||||||
function chatctl_lookup(user)
|
function chatctl_lookup(user)
|
||||||
assert(user)
|
assert(user)
|
||||||
local handle = io.popen("python3 /home/vmail/chatctl hexlookup "..escape(user))
|
local handle = io.popen("doveauth hexlookup "..escape(user))
|
||||||
local result = handle:read("*a")
|
local result = handle:read("*a")
|
||||||
handle:close()
|
handle:close()
|
||||||
return split_chatctl(result)
|
return split_chatctl(result)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from doveauth import get_user_data, verify_user
|
from doveauth.doveauth import get_user_data, verify_user
|
||||||
|
|
||||||
|
|
||||||
def test_basic():
|
def test_basic():
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
python3 -m venv chatmail-pyinfra/venv
|
python3 -m venv chatmail-pyinfra/venv
|
||||||
chatmail-pyinfra/venv/bin/pip install pyinfra
|
chatmail-pyinfra/venv/bin/pip install pyinfra pytest
|
||||||
chatmail-pyinfra/venv/bin/pip install -e chatmail-pyinfra
|
chatmail-pyinfra/venv/bin/pip install -e chatmail-pyinfra
|
||||||
|
chatmail-pyinfra/venv/bin/pip install -e doveauth
|
||||||
python3 -m venv doveauth/venv
|
python3 -m venv doveauth/venv
|
||||||
|
doveauth/venv/bin/pip install pytest
|
||||||
doveauth/venv/bin/pip install -e doveauth
|
doveauth/venv/bin/pip install -e doveauth
|
||||||
|
|||||||
Reference in New Issue
Block a user