gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-twister] branch master updated: test whether status


From: gnunet
Subject: [GNUnet-SVN] [taler-twister] branch master updated: test whether status code has been hacked
Date: Sat, 20 Jan 2018 18:48:07 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository twister.

The following commit(s) were added to refs/heads/master by this push:
     new d174a73  test whether status code has been hacked
d174a73 is described below

commit d174a733b719570fd7853066a3140222ee303c25
Author: Marcello Stanisci <address@hidden>
AuthorDate: Sat Jan 20 18:47:52 2018 +0100

    test whether status code has been hacked
---
 src/test/test_twister.sh | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/test/test_twister.sh b/src/test/test_twister.sh
index 5019b3d..f7d278f 100755
--- a/src/test/test_twister.sh
+++ b/src/test/test_twister.sh
@@ -2,28 +2,29 @@
 
 # Steps:
 
-# 1) Launch the Web server.
+# Launch the Web server.
 ./test_twister_webserver &
 web_server_pid=$!
 
-# 2) Launch the Twister.
-
+# Launch the Twister.
 taler-twister-service -c ./test_twister.conf &
 twister_service_pid=$!
 
-# 3) Use the Twister-APIs via the C-L tool.
+# Use the Twister-APIs to hack the response code.
+taler-twister -c ./test_twister.conf --responsecode 202
 
 # 4) Use curl to GET /something
 status_code=$(curl -s http://localhost:8888/ -o /dev/null \
   -w "%{http_code}")
 
-
-echo $status_code
-
-# 5) Check the HTTP status code is the hacked! 
-
-
 # shutdown twister and webserver
-
 kill $web_server_pid
 kill $twister_service_pid
+
+# check status code has been hacked
+if ! test 202 = $status_code; then
+  echo "Response code has not been hacked."
+  exit 1
+fi
+
+exit 0

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]