diff options
author | EuAndreh <eu@euandre.org> | 2024-07-26 11:15:50 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-07-26 11:15:50 -0300 |
commit | 44437e16ef4ba68890acc221fbde062ab3a478c0 (patch) | |
tree | 0e60c5088028fe9d672483a3e82e31aab314c18d /tests/integration.sh | |
parent | src/lib.go: Get CopyData() from gobang (diff) | |
download | binder-44437e16ef4ba68890acc221fbde062ab3a478c0.tar.gz binder-44437e16ef4ba68890acc221fbde062ab3a478c0.tar.xz |
tests/integration.sh: Use more specific assertion functions
Diffstat (limited to 'tests/integration.sh')
-rwxr-xr-x | tests/integration.sh | 14 |
1 files changed, 7 insertions, 7 deletions
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' |