]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/commitdiff
tests: Rename tlsproxy() and server() to *_background().
authorSimon Ruderich <simon@ruderich.org>
Sun, 18 Aug 2013 13:33:57 +0000 (15:33 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 18 Aug 2013 13:33:57 +0000 (15:33 +0200)
tests/common.sh
tests/tests-authentication.sh
tests/tests-normal.sh
tests/tests-passthrough.sh

index 68ff879f5fcee26b14c06471147e9d4894d67980..b72cafb753bee653a750694335d1e623b1f2f19b 100644 (file)
@@ -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=$!
 }
index 1ad5bc788b5d90fbbf0159674de6a59c29c8ce87..80ee1da87b4f41b96701e687ca08575b189eb7f3 100755 (executable)
@@ -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
 
index 57ce39a8a12b8dfbcd1797ee5b98fd147ed92386..056780fd2ca2f5711e763ebe365b1c1735cf2edb 100755 (executable)
@@ -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
 
index f96e782438c7276f76ef7181f4948e0750267d2c..c2351d9a98ae679f13dbc8d543905ebb40306a01 100755 (executable)
@@ -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