summaryrefslogtreecommitdiff
path: root/src/test/test_twister.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_twister.sh')
-rwxr-xr-xsrc/test/test_twister.sh28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/test/test_twister.sh b/src/test/test_twister.sh
index 0347f66..c6713ce 100755
--- a/src/test/test_twister.sh
+++ b/src/test/test_twister.sh
@@ -2,17 +2,17 @@
# This file is part of GNUnet.
# Copyright (C) 2018 Taler Systems SA
-#
+#
# Twister is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version
# 3, or (at your option) any later version.
-#
+#
# Twister is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
# the GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public
# License along with Twister; see the file COPYING. If not,
# write to the Free Software Foundation, Inc., 51 Franklin
@@ -20,9 +20,9 @@
# @author Marcello Stanisci
# @author Christian Grothoff
-#
+#
# @file test_twister.sh
-#
+#
# @brief Twister testcases.
@@ -150,6 +150,24 @@ fi
echo "field-modification with string passed".
+# set header
+taler-twister -c ./test_twister.conf \
+ -H "Date" \
+ --value "January 32nd"
+modobject_body=$(curl -sI ${TWISTER_URL} | grep -Fi Date | tr -d '\r')
+echo $modobject_body
+
+if ! test \
+ 'Date: January 32nd' = "$modobject_body"; then
+ printf "Response header (%s) has not been modified as expected\n" \
+ "$modobject_body"
+ kill $web_server_pid
+ kill $twister_service_pid
+ exit 1
+fi
+
+echo "download header-modification passed".
+
# check if cumulative mods work.
taler-twister -c ./test_twister.conf \
-m "hello" -V "world" \