1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-20 15:07:03 +00:00

test: Add a new integration test with minor dialogs

This patch adds a new integration test, which executes various small
dialogs, to cover corner cases that are not well covered (according to
our coverage report).

For example, "EHLO" without domain, or invalid DATA.

While we could do them via Go tests, this way is more realistic, and the
tests are easier to write.
This commit is contained in:
Alberto Bertogli
2018-02-25 02:50:39 +00:00
parent 5ce4ff2602
commit 61d2961ee9
15 changed files with 247 additions and 0 deletions

26
test/t-12-minor_dialogs/run.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -e
. $(dirname ${0})/../util/lib.sh
init
generate_certs_for testserver
add_user user@testserver secretpassword
mkdir -p .logs
chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config &
wait_until_ready 1025
FAILED=0
for i in *.cmy; do
if ! chamuyero $i > .logs/$i.log 2>&1 ; then
echo "test $i failed, see .logs/$i.log"
FAILED=1
fi
done
if [ $FAILED == 1 ]; then
fail
fi
success