diff options
Diffstat (limited to '')
-rwxr-xr-x | fluent-bit/tests/runtime_shell/in_syslog_tcp_plaintext_expect.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/fluent-bit/tests/runtime_shell/in_syslog_tcp_plaintext_expect.sh b/fluent-bit/tests/runtime_shell/in_syslog_tcp_plaintext_expect.sh new file mode 100755 index 00000000..414d4069 --- /dev/null +++ b/fluent-bit/tests/runtime_shell/in_syslog_tcp_plaintext_expect.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +. ${FLB_RUNTIME_SHELL_PATH}/common.sh + +input_generator() { + result=$(wait_for_fluent_bit ${SIGNAL_FILE_PATH}) + + if test "$result" -eq "0" + then + echo '<13>1 1970-01-01T00:00:00.000000+00:00 testhost testuser - - [] Hello!' | \ + nc -w 1 $LISTENER_HOST $LISTENER_PORT + fi +} + +test_in_syslog_tcp_plaintext_filter_expect() { + export SIGNAL_FILE_PATH="/tmp/fb_signal_$$" + export LISTENER_HOST=127.0.0.1 + export LISTENER_PORT=50001 + + input_generator & + + $FLB_BIN -c $FLB_RUNTIME_SHELL_CONF/in_syslog_tcp_plaintext_expect.conf +} + +# The following command launch the unit test +. $FLB_RUNTIME_SHELL_PATH/runtime_shell.env |