tests: wait for rspamd-milter.sock in ldap and internal tests
I've hit more races in these tests recently while running the test suite on a much faster host system.
This commit is contained in:
@@ -115,6 +115,11 @@ in
|
|||||||
machine.wait_for_unit("multi-user.target")
|
machine.wait_for_unit("multi-user.target")
|
||||||
machine.wait_for_unit("dovecot.service")
|
machine.wait_for_unit("dovecot.service")
|
||||||
|
|
||||||
|
# TODO put this blocking into the systemd units?
|
||||||
|
machine.wait_until_succeeds(
|
||||||
|
"set +e; timeout 1 nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]"
|
||||||
|
)
|
||||||
|
|
||||||
# Regression test for https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/205
|
# Regression test for https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/205
|
||||||
with subtest("mail forwarded can are locally kept"):
|
with subtest("mail forwarded can are locally kept"):
|
||||||
# A mail sent to user2@example.com via explicit TLS is in the user1@example.com mailbox
|
# A mail sent to user2@example.com via explicit TLS is in the user1@example.com mailbox
|
||||||
|
|||||||
@@ -128,6 +128,11 @@ in
|
|||||||
machine.start()
|
machine.start()
|
||||||
machine.wait_for_unit("multi-user.target")
|
machine.wait_for_unit("multi-user.target")
|
||||||
|
|
||||||
|
# TODO put this blocking into the systemd units?
|
||||||
|
machine.wait_until_succeeds(
|
||||||
|
"set +e; timeout 1 nc -U /run/rspamd/rspamd-milter.sock < /dev/null; [ $? -eq 124 ]"
|
||||||
|
)
|
||||||
|
|
||||||
# This function retrieves the ldap table file from a postconf
|
# This function retrieves the ldap table file from a postconf
|
||||||
# command.
|
# command.
|
||||||
# A key lookup is achived and the returned value is compared
|
# A key lookup is achived and the returned value is compared
|
||||||
|
|||||||
Reference in New Issue
Block a user