[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-twister] branch master updated: Tests for 5724.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-twister] branch master updated: Tests for 5724. |
Date: |
Mon, 03 Jun 2019 20:02:55 +0200 |
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 cecc7bb Tests for 5724.
cecc7bb is described below
commit cecc7bb3c76c909988e098dde86b822112196b21
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Jun 3 20:01:37 2019 +0200
Tests for 5724.
Adding a PUT and POST test case with a fair big JSON.
---
src/test/test_twister.sh | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/src/test/test_twister.sh b/src/test/test_twister.sh
index 14b15ca..55962fd 100755
--- a/src/test/test_twister.sh
+++ b/src/test/test_twister.sh
@@ -144,7 +144,7 @@ if ! test '{"hello":"world"}' = $cum_mods; then
exit 1
fi
-# check if Twister does compression.
+# check if Twister decompresses.
status_code=$(curl \
-s "${TWISTER_URL}deflate-test" \
-o /dev/null \
@@ -161,6 +161,38 @@ if ! test 200 = $status_code; then
exit 1
fi
+
+# Just upload a big blob; first with PUT then with POST.
+printf "{\"things\": \"%s\"}" \
+ $(for i in $(seq 1 100000); do
+ echo -n z; done) > BIGBLOB.json
+
+status_code=$(curl \
+ -s "${TWISTER_URL}BIGPUT" \
+ -o /dev/null \
+ -X PUT \
+ -H "Content-Type: application/json" \
+ address@hidden \
+ -w "%{http_code}")
+
+status_code=$(curl \
+ -s "${TWISTER_URL}BIGPOST" \
+ -o /dev/null \
+ -X POST \
+ -H "Content-Type: application/json" \
+ address@hidden \
+ -w "%{http_code}")
+
+rm BIGBLOB.json
+
+## check status code is okay.
+if ! test 200 = $status_code; then
+ echo "PUTting big blob failed (status == ${status_code})."
+ kill $web_server_pid
+ kill $twister_service_pid
+ exit 1
+fi
+
# shutdown twister and webserver
kill $web_server_pid
kill $twister_service_pid
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-twister] branch master updated: Tests for 5724.,
gnunet <=