summaryrefslogtreecommitdiffstats
path: root/vendor/textalk/websocket/tests/scripts/client.connect-persistent.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:26:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:26:02 +0000
commitfcbf3ce37ca8f90a3e36d524a3274ffc063a40e3 (patch)
tree84c735df2e97350a721273e9dd425729d43cc8a2 /vendor/textalk/websocket/tests/scripts/client.connect-persistent.json
parentInitial commit. (diff)
downloadicingaweb2-module-pdfexport-fcbf3ce37ca8f90a3e36d524a3274ffc063a40e3.tar.xz
icingaweb2-module-pdfexport-fcbf3ce37ca8f90a3e36d524a3274ffc063a40e3.zip
Adding upstream version 0.10.2+dfsg1.upstream/0.10.2+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--vendor/textalk/websocket/tests/scripts/client.connect-persistent.json95
1 files changed, 95 insertions, 0 deletions
diff --git a/vendor/textalk/websocket/tests/scripts/client.connect-persistent.json b/vendor/textalk/websocket/tests/scripts/client.connect-persistent.json
new file mode 100644
index 0000000..d95af01
--- /dev/null
+++ b/vendor/textalk/websocket/tests/scripts/client.connect-persistent.json
@@ -0,0 +1,95 @@
+[
+ {
+ "function": "stream_context_create",
+ "params": [],
+ "return": "@mock-stream-context"
+ },
+ {
+ "function": "stream_socket_client",
+ "params": [
+ "tcp:\/\/localhost:8000",
+ null,
+ null,
+ 5,
+ 5,
+ "@mock-stream-context"
+ ],
+ "return": "@mock-stream"
+ },
+ {
+ "function": "get_resource_type",
+ "params": [
+ "@mock-stream"
+ ],
+ "return": "persistent stream"
+ },
+ {
+ "function": "get_resource_type",
+ "params": [
+ "@mock-stream"
+ ],
+ "return": "persistent stream"
+ },
+ {
+ "function": "ftell",
+ "params": [
+ "@mock-stream"
+ ],
+ "return": 0
+ },
+ {
+ "function": "stream_set_timeout",
+ "params": [
+ "@mock-stream",
+ 5
+ ],
+ "return": true
+ },
+ {
+ "function": "fwrite",
+ "params": [
+ "@mock-stream"
+ ],
+ "return-op": "key-save",
+ "return": 248
+ },
+ {
+ "function": "stream_get_line",
+ "params": [
+ "@mock-stream",
+ 1024,
+ "\r\n\r\n"
+ ],
+ "return-op": "key-respond",
+ "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: {key}"
+ },
+ {
+ "function": "fwrite",
+ "params": [
+ "@mock-stream"
+ ],
+ "return": 13
+ },
+ {
+ "function": "get_resource_type",
+ "params": [
+ "@mock-stream"
+ ],
+ "return": "persistent stream"
+ },
+ {
+ "function": "get_resource_type",
+ "params": [
+ "@mock-stream"
+ ],
+ "return": "persistent stream"
+ },
+ {
+ "function": "fclose",
+ "params": [
+ "@mock-stream"
+ ],
+ "return":true
+ }
+]
+