1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

test: Extend chasquid-util aliases-add tests

This commit is contained in:
Alberto Bertogli
2019-10-19 11:54:01 +01:00
parent 8d910fc84d
commit 605e39d0e3

View File

@@ -81,12 +81,22 @@ if [ "$C" != "hostname: \"$HOSTNAME\"" ]; then
fi
if r aliases-add alias2@domain target > /dev/null; then
ALIAS=$(grep alias2 .config/domains/domain/aliases)
if [ "$ALIAS" != "alias2: target" ]; then
echo alias-add failed
echo output: "$ALIAS"
A=$(grep alias2 .config/domains/domain/aliases)
if [ "$A" != "alias2: target" ]; then
echo aliases-add failed
echo output: "$A"
exit 1
fi
fi
if r aliases-add alias2@domain target > /dev/null; then
echo aliases-add on existing alias worked
exit 1
fi
if r aliases-add alias3@notexist target > /dev/null; then
echo aliases-add on non-existing domain worked
exit 1
fi
success