From 44437e16ef4ba68890acc221fbde062ab3a478c0 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 26 Jul 2024 11:15:50 -0300 Subject: tests/integration.sh: Use more specific assertion functions --- tests/integration.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/integration.sh') diff --git a/tests/integration.sh b/tests/integration.sh index 4c59d3f..3b0c96d 100755 --- a/tests/integration.sh +++ b/tests/integration.sh @@ -14,15 +14,15 @@ test_exits_when_upstream_errors() { rm -f s1.socket ./binder.bin localhost:1234 s1.socket 1>"$OUT" 2>"$ERR" & - while ! lsof -s TCP:LISTEN -i :1234 > /dev/null; do + while ! lsof -s TCP:LISTEN -i :1234 > /dev/null; do true done echo request | socat tcp-connect:localhost:1234 stdio > client.txt - assert_fgrep_stream '$OUT' "$OUT" 'listen-start' - assert_fgrep_stream '$OUT' "$OUT" 'active-connections' - assert_fgrep_stream '$OUT' "$OUT" 'dial-connection' + assert_fgrep_stdout 'listen-start' + assert_fgrep_stdout 'active-connections' + assert_fgrep_stdout 'dial-connection' assert_empty_stderr assert_empty_stream 'client.txt' client.txt rm -f "$OUT" "$ERR" s1.socket client.txt @@ -41,7 +41,7 @@ test_works_from_client_to_server() { rm -f s2.socket ./binder.bin localhost:1234 s2.socket 1>"$OUT" 2>"$ERR" & pid=$! - while ! lsof -s TCP:LISTEN -i :1234 > /dev/null; do + while ! lsof -s TCP:LISTEN -i :1234 > /dev/null; do true done @@ -54,8 +54,8 @@ test_works_from_client_to_server() { kill $pid wait - assert_fgrep_stream '$OUT' "$OUT" 'listen-start' - assert_fgrep_stream '$OUT' "$OUT" 'active-connections' + assert_fgrep_stdout 'listen-start' + assert_fgrep_stdout 'active-connections' assert_empty_stderr assert_fgrep_stream 'client.txt' client.txt 'response' assert_fgrep_stream 'server.txt' server.txt 'request' -- cgit v1.2.3