This is an automated email from the ASF dual-hosted git repository.

markusthoemmes pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-performance.git

commit 9a0cf499a1f9f46955b09cc2ccce7e1ac2b67a3e
Author: Markus Thoemmes <markus.thoem...@de.ibm.com>
AuthorDate: Mon Apr 24 13:47:44 2017 +0200

    Refactor test setup
---
 test.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/test.sh b/test.sh
index e67ae9f..4b464fa 100755
--- a/test.sh
+++ b/test.sh
@@ -1,14 +1,17 @@
 #!/bin/sh
+set -e
 
 action="noop"
+credentials="$(cat openwhisk/ansible/files/auth.guest)"
+host="172.17.0.1:10001"
 
 # create a noop action
 echo "Creating noop action"
-curl -u "$(cat openwhisk/ansible/files/auth.guest)" 
"172.17.0.1:10001/api/v1/namespaces/_/actions/$action" -XPUT -d 
'{"namespace":"_","name":"test","exec":{"kind":"nodejs:default","code":"function
 main(){return {};}"}}' -H "Content-Type: application/json"
+curl -u "$credentials" "$host/api/v1/namespaces/_/actions/$action" -XPUT -d 
'{"namespace":"_","name":"test","exec":{"kind":"nodejs:default","code":"function
 main(){return {};}"}}' -H "Content-Type: application/json"
 
 # run the noop action
 echo "Running noop action once to assert an intact system"
-curl -u "$(cat openwhisk/ansible/files/auth.guest)" 
"172.17.0.1:10001/api/v1/namespaces/_/actions/$action?blocking=true" -XPOST
+curl -u "$credentials" 
"$host/api/v1/namespaces/_/actions/$action?blocking=true" -XPOST
 
 # run performance harness
-docker run --rm markusthoemmes/loadtest loadtest -n 10000 -H "Authorization: 
basic 
MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
 "http://172.17.0.1:10001/api/v1/namespaces/_/actions/$action?blocking=true"; -m 
POST
\ No newline at end of file
+docker run --rm markusthoemmes/loadtest loadtest -n 10000 -H "Authorization: 
basic $(echo $credentials | base64 -w 0)" 
"http://$host/api/v1/namespaces/_/actions/$action?blocking=true"; -m POST
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <commits@openwhisk.apache.org>.

Reply via email to