From 412b6491a940ba3de97e5be95bd35197e51ee210 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 18 Aug 2013 15:33:57 +0200 Subject: [PATCH] tests: Rename tlsproxy() and server() to *_background(). --- tests/common.sh | 4 ++-- tests/tests-authentication.sh | 6 +++--- tests/tests-normal.sh | 10 +++++----- tests/tests-passthrough.sh | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/common.sh b/tests/common.sh index 68ff879..b72cafb 100644 --- a/tests/common.sh +++ b/tests/common.sh @@ -64,12 +64,12 @@ tlsproxy_add() { # doesn't use `cp`. "$srcdir/../src/tlsproxy-add" "$1" < "$srcdir/$2" >/dev/null 2>&1 } -tlsproxy() { +tlsproxy_background() { #valgrind --leak-check=full --error-exitcode=1 --track-fds=yes \ ../src/tlsproxy -d2 "$@" >tlsproxy-log 2>&1 & pid_tlsproxy=$! } -server() { +server_background() { gnutls-serv --http --port 4712 "$@" >/dev/null 2>&1 & pid_server=$! } diff --git a/tests/tests-authentication.sh b/tests/tests-authentication.sh index 1ad5bc7..80ee1da 100755 --- a/tests/tests-authentication.sh +++ b/tests/tests-authentication.sh @@ -27,9 +27,9 @@ cleanup tlsproxy_setup echo 'dXNlcm5hbWU6cGFzc3dvcmQ=' > digest-authentication -tlsproxy -a digest-authentication 4711 -server --x509certfile "$srcdir/server.pem" \ - --x509keyfile "$srcdir/server-key.pem" +tlsproxy_background -a digest-authentication 4711 +server_background --x509certfile "$srcdir/server.pem" \ + --x509keyfile "$srcdir/server-key.pem" wait_for_ports 4711 4712 rm -f digest-authentication diff --git a/tests/tests-normal.sh b/tests/tests-normal.sh index 57ce39a..056780f 100755 --- a/tests/tests-normal.sh +++ b/tests/tests-normal.sh @@ -27,9 +27,9 @@ cleanup tlsproxy_setup # Normal tests. -tlsproxy 4711 -server --x509certfile "$srcdir/server.pem" \ - --x509keyfile "$srcdir/server-key.pem" +tlsproxy_background 4711 +server_background --x509certfile "$srcdir/server.pem" \ + --x509keyfile "$srcdir/server-key.pem" wait_for_ports 4711 4712 @@ -70,8 +70,8 @@ test_no_invalid_certificate # Stop server and try a "MITM" with a bad certificate. echo kill $pid_server || echo 'failed to kill gnutls-serv' -server --x509certfile "$srcdir/server-bad.pem" \ - --x509keyfile "$srcdir/server-key.pem" +server_background --x509certfile "$srcdir/server-bad.pem" \ + --x509keyfile "$srcdir/server-key.pem" wait_for_ports 4712 rm -f certificate-localhost-proxy.pem certificate-localhost-server.pem diff --git a/tests/tests-passthrough.sh b/tests/tests-passthrough.sh index f96e782..c2351d9 100755 --- a/tests/tests-passthrough.sh +++ b/tests/tests-passthrough.sh @@ -27,9 +27,9 @@ cleanup tlsproxy_setup # Normal tests. -tlsproxy -u 4711 -server --x509certfile "$srcdir/server.pem" \ - --x509keyfile "$srcdir/server-key.pem" +tlsproxy_background -u 4711 +server_background --x509certfile "$srcdir/server.pem" \ + --x509keyfile "$srcdir/server-key.pem" wait_for_ports 4711 4712 @@ -72,8 +72,8 @@ test_no_invalid_certificate # Stop server and try a "MITM" with a bad certificate. echo kill $pid_server || echo 'failed to kill gnutls-serv' -server --x509certfile "$srcdir/server-bad.pem" \ - --x509keyfile "$srcdir/server-key.pem" +server_background --x509certfile "$srcdir/server-bad.pem" \ + --x509keyfile "$srcdir/server-key.pem" wait_for_ports 4712 rm -f certificate-localhost-proxy.pem certificate-localhost-server.pem -- 2.43.2