You must login to view /lordwelch/chasquid/src/commit/213bc63a95bae17048b284fe247c20c7f3c625f4/test/t-05-null_address.
The GitHub option should be usable for most people, it only links via username.

Files
chasquid/cmd/chasquid-util/test_domaininfo_remove.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

20 lines
445 B
Plaintext

# Test success.
server unix_listen .data/localrpc-v1
c = ./chasquid-util -C=.config domaininfo-remove domain.com
server <- DomaininfoClear Domain=domain.com
server -> 200
c wait 0
# Test error.
server unix_listen .data/localrpc-v1
c = ./chasquid-util -C=.config domaininfo-remove domain.com
server <- DomaininfoClear Domain=domain.com
server -> 500 This is a test error
c <- Error removing domaininfo entry: This is a test error
c wait 1