make doveauth tests pass again

This commit is contained in:
missytake
2023-10-13 20:15:07 +02:00
parent 93a84617a8
commit 01f350fa0b
3 changed files with 6 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ end
-- call out to python program to actually manage authentication for dovecot
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)
local handle = io.popen(cmd)
local result = handle:read("*a")
@@ -18,7 +18,7 @@ end
function chatctl_lookup(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")
handle:close()
return split_chatctl(result)

View File

@@ -1,7 +1,7 @@
import subprocess
import pytest
from doveauth import get_user_data, verify_user
from doveauth.doveauth import get_user_data, verify_user
def test_basic():

View File

@@ -1,6 +1,8 @@
#!/bin/sh
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 doveauth
python3 -m venv doveauth/venv
doveauth/venv/bin/pip install pytest
doveauth/venv/bin/pip install -e doveauth