summaryrefslogtreecommitdiffstats
path: root/coverage/scripts/03-auto-ws.sh
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2018-07-12 10:59:48 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-07-24 16:28:32 +0200
commite17ae412245ba9afb33ff6a0f1f665b4d66d4da4 (patch)
tree698628c58b541007033ede6b4343dae921214da6 /coverage/scripts/03-auto-ws.sh
parent4c0f6ce66c66d39dc61ec661d88277c51d2fd9ae (diff)
coverage and test: Add tests
coverage values: - lines: 70.5 % - functions: 76.3 % Change-Id: Iaf802e84bbfa57502bbbac8c3b567b14c01608b6 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'coverage/scripts/03-auto-ws.sh')
-rwxr-xr-xcoverage/scripts/03-auto-ws.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/coverage/scripts/03-auto-ws.sh b/coverage/scripts/03-auto-ws.sh
new file mode 100755
index 00000000..9d3726e4
--- /dev/null
+++ b/coverage/scripts/03-auto-ws.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+$R/bin/afb-client -s -e $WSURL <<EOC
+x-hello ping true
+x-HELLO PING false
+x-hello pIngNull true
+x-hello PingBug true
+x-hello PiNgJsOn {"well":"formed","json":[1,2,3,4.5,true,false,null,"oups"]}
+x-hello subcall {"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}
+x-hello subcall {"api":"x-hello","verb":"subcall","args":{"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+x-hello subcallsync {"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}
+x-hello subcallsync {"api":"x-hello","verb":"subcall","args":{"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+x-hello subcall {"api":"x-hello","verb":"subcallsync","args":{"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+x-hello subcallsync {"api":"x-hello","verb":"subcallsync","args":{"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+x-hello eventadd {"tag":"ev1","name":"event-A"}
+x-hello eventadd {"tag":"ev2","name":"event-B"}
+x-hello eventpush {"tag":"ev1","data":[1,2,"x-hello"]}
+x-hello eventpush {"tag":"ev2","data":{"item":0}}
+x-hello eventsub {"tag":"ev2"}
+x-hello eventpush {"tag":"ev1","data":[1,2,"x-hello"]}
+x-hello eventpush {"tag":"ev2","data":{"item":0}}
+x-hello eventsub {"tag":"ev1"}
+x-hello subcall {"api":"x-hello","verb":"eventpush","args":{"tag":"ev1","data":[1,2,"x-hello"]}}
+x-hello subcall {"api":"x-hello","verb":"eventpush","args":{"tag":"ev2","data":{"item":0}}}
+x-hello subcallsync {"api":"x-hello","verb":"eventpush","args":{"tag":"ev1","data":[1,2,"x-hello"]}}
+x-hello subcallsync {"api":"x-hello","verb":"eventpush","args":{"tag":"ev2","data":{"item":0}}}
+x-hello eventunsub {"tag":"ev2"}
+x-hello eventpush {"tag":"ev1","data":[1,2,"x-hello"]}
+x-hello eventpush {"tag":"ev2","data":{"item":0}}
+x-hello eventdel {"tag":"ev1"}
+x-hello eventpush {"tag":"ev1","data":[1,2,"x-hello"]}
+x-hello eventpush {"tag":"ev2","data":{"item":0}}
+x-hello eventdel {"tag":"ev2"}
+EOC
+