mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 01:40:42 +01:00
testsuite: Fixed imtcp_conndrop_tls tests to use TLS
Tests did not use TLS properly. Also created a configuration for imtcp conndrop tls based on imtcp-tls-basic test.
This commit is contained in:
parent
248f3ed8f4
commit
6d14c8620d
@ -5,14 +5,15 @@
|
|||||||
# This file is part of the rsyslog project, released under GPLv3
|
# This file is part of the rsyslog project, released under GPLv3
|
||||||
echo ====================================================================================
|
echo ====================================================================================
|
||||||
echo TEST: \[imtcp_conndrop_tls-vg.sh\]: test imtcp/tls with random connection drops
|
echo TEST: \[imtcp_conndrop_tls-vg.sh\]: test imtcp/tls with random connection drops
|
||||||
cat rsyslog.action.1.include
|
|
||||||
. $srcdir/diag.sh init
|
. $srcdir/diag.sh init
|
||||||
. $srcdir/diag.sh startup-vg imtcp_conndrop.conf
|
echo \$DefaultNetstreamDriverCAFile $srcdir/tls-certs/ca.pem >rsyslog.conf.tlscert
|
||||||
|
echo \$DefaultNetstreamDriverCertFile $srcdir/tls-certs/cert.pem >>rsyslog.conf.tlscert
|
||||||
|
echo \$DefaultNetstreamDriverKeyFile $srcdir/tls-certs/key.pem >>rsyslog.conf.tlscert
|
||||||
|
. $srcdir/diag.sh startup-vg imtcp_conndrop_tls.conf
|
||||||
# 100 byte messages to gain more practical data use
|
# 100 byte messages to gain more practical data use
|
||||||
. $srcdir/diag.sh tcpflood -c20 -m50000 -r -d100 -P129 -D
|
. $srcdir/diag.sh tcpflood -c20 -p13514 -m10000 -r -d100 -P129 -D -l0.995 -Ttls -Z$srcdir/tls-certs/cert.pem -z$srcdir/tls-certs/key.pem
|
||||||
sleep 10 # due to large messages, we need this time for the tcp receiver to settle...
|
sleep 5 # due to large messages, we need this time for the tcp receiver to settle...
|
||||||
. $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
. $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||||
. $srcdir/diag.sh wait-shutdown-vg # and wait for it to terminate
|
. $srcdir/diag.sh wait-shutdown # and wait for it to terminate
|
||||||
. $srcdir/diag.sh check-exit-vg
|
. $srcdir/diag.sh seq-check 0 9999 -E
|
||||||
. $srcdir/diag.sh seq-check 0 49999 -E
|
|
||||||
. $srcdir/diag.sh exit
|
. $srcdir/diag.sh exit
|
||||||
|
|||||||
@ -5,13 +5,16 @@
|
|||||||
# This file is part of the rsyslog project, released under GPLv3
|
# This file is part of the rsyslog project, released under GPLv3
|
||||||
echo ====================================================================================
|
echo ====================================================================================
|
||||||
echo TEST: \[imtcp_conndrop_tls.sh\]: test imtcp/tls with random connection drops
|
echo TEST: \[imtcp_conndrop_tls.sh\]: test imtcp/tls with random connection drops
|
||||||
cat rsyslog.action.1.include
|
|
||||||
. $srcdir/diag.sh init
|
. $srcdir/diag.sh init
|
||||||
. $srcdir/diag.sh startup imtcp_conndrop.conf
|
echo \$DefaultNetstreamDriverCAFile $srcdir/tls-certs/ca.pem >rsyslog.conf.tlscert
|
||||||
|
echo \$DefaultNetstreamDriverCertFile $srcdir/tls-certs/cert.pem >>rsyslog.conf.tlscert
|
||||||
|
echo \$DefaultNetstreamDriverKeyFile $srcdir/tls-certs/key.pem >>rsyslog.conf.tlscert
|
||||||
|
. $srcdir/diag.sh startup imtcp_conndrop_tls.conf
|
||||||
# 100 byte messages to gain more practical data use
|
# 100 byte messages to gain more practical data use
|
||||||
. $srcdir/diag.sh tcpflood -c20 -m50000 -r -d100 -P129 -D
|
. $srcdir/diag.sh tcpflood -c20 -p13514 -m50000 -r -d100 -P129 -D -l0.995 -Ttls -Z$srcdir/tls-certs/cert.pem -z$srcdir/tls-certs/key.pem
|
||||||
sleep 10 # due to large messages, we need this time for the tcp receiver to settle...
|
sleep 5 # due to large messages, we need this time for the tcp receiver to settle...
|
||||||
. $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
. $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||||
. $srcdir/diag.sh wait-shutdown # and wait for it to terminate
|
. $srcdir/diag.sh wait-shutdown # and wait for it to terminate
|
||||||
. $srcdir/diag.sh seq-check 0 49999 -E
|
. $srcdir/diag.sh seq-check 0 49999 -E
|
||||||
|
# . $srcdir/diag.sh content-check 'XXXXX' # Not really a check if it worked, but in TLS stuff in unfished TLS Packets gets lost, so we can't use seq-check.
|
||||||
. $srcdir/diag.sh exit
|
. $srcdir/diag.sh exit
|
||||||
|
|||||||
21
tests/testsuites/imtcp_conndrop_tls.conf
Normal file
21
tests/testsuites/imtcp_conndrop_tls.conf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# simple async writing test
|
||||||
|
# rgerhards, 2010-03-09
|
||||||
|
$MaxMessageSize 10k
|
||||||
|
$IncludeConfig diag-common.conf
|
||||||
|
|
||||||
|
$ModLoad ../plugins/imtcp/.libs/imtcp
|
||||||
|
$MainMsgQueueTimeoutShutdown 10000
|
||||||
|
|
||||||
|
# TLS Stuff - certificate files - just CA for a client
|
||||||
|
$DefaultNetstreamDriver gtls
|
||||||
|
$IncludeConfig rsyslog.conf.tlscert
|
||||||
|
$InputTCPServerStreamDriverMode 1
|
||||||
|
$InputTCPServerStreamDriverAuthMode anon
|
||||||
|
$InputTCPServerRun 13514
|
||||||
|
|
||||||
|
$template outfmt,"%msg:F,58:2%,%msg:F,58:3%,%msg:F,58:4%\n"
|
||||||
|
$template dynfile,"rsyslog.out.log" # trick to use relative path names!
|
||||||
|
$OMFileFlushOnTXEnd off
|
||||||
|
$OMFileFlushInterval 2
|
||||||
|
$OMFileIOBufferSize 256k
|
||||||
|
local0.* ?dynfile;outfmt
|
||||||
Loading…
x
Reference in New Issue
Block a user