Files
chasquid/test/t-04-aliases/test_chasquid_util.cmy
Alberto Bertogli e6c6df457d chasquid-util: Use server for aliases-resolve and domaininfo-remove
This patch makes chasquid-util's aliases-resolve and domaininfo-remove
commands talk to the chasquid server (via the new localrpc server).

For aliases-resolve, currently has fairly hacky logic which reimplements
a bunch of the servers', and is also incomplete because it does not
support hooks.

In this patch we fix that by having it talk to the server, where we get
authoritative responses and have no issues with aliases hooks. This
resolves https://github.com/albertito/chasquid/issues/18.

For domaininfo-remove, currently its implementation is also very hacky
since it manipulates files behind the servers' back and without even
using the internal library.

In this patch we fix that by doing the operation through the server,
avoiding the need for those hacks, and also remove the need to manually
reload the server afterwards.
2023-07-30 13:21:07 +01:00

28 lines
752 B
Plaintext

# Resolve an unknown user.
c = ./chasquid-util.sh aliases-resolve anunknownuser@blah
c <- (email) anunknownuser@blah
c wait 0
# Resolve a known alias.
c = ./chasquid-util.sh aliases-resolve a.ñi_l-blah@testserver
c <- (email) azul@testserver
c <- (email) índigo@testserver
c wait 0
# Resolve a pipe alias.
c = ./chasquid-util.sh aliases-resolve tubo@testserver
c <- (pipe) writemailto ../.data/pipe_alias_worked
c wait 0
# Resolve aliases that are exposed via the hook.
c = ./chasquid-util.sh aliases-resolve vicuña@testserver
c <- (email) jose@testserver
c <- (email) juan@testserver
c wait 0
# The hook for this alias exits with error.
c = ./chasquid-util.sh aliases-resolve roto@testserver
c <- Error resolving: exit status 1
c wait 1