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:
26
test/t-12-minor_dialogs/run.sh
Executable file
26
test/t-12-minor_dialogs/run.sh
Executable 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
|
||||
Reference in New Issue
Block a user