quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test2300 (908B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 WebSockets
      5 </keywords>
      6 </info>
      7 
      8 #
      9 # Server-side
     10 <reply>
     11 <data nocheck="yes">
     12 HTTP/1.1 101 Switching to WebSockets swsclose
     13 Server: test-server/fake
     14 Upgrade: websocket
     15 Connection: Upgrade
     16 Sec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs=
     17 
     18 </data>
     19 # allow upgrade
     20 <servercmd>
     21 upgrade
     22 </servercmd>
     23 </reply>
     24 
     25 #
     26 # Client-side
     27 <client>
     28 # for the forced CURL_ENTROPY
     29 <features>
     30 Debug
     31 ws
     32 </features>
     33 <server>
     34 http
     35 </server>
     36 <name>
     37 WebSockets upgrade only
     38 </name>
     39 <command>
     40 ws://%HOSTIP:%HTTPPORT/%TESTNUMBER
     41 </command>
     42 </client>
     43 
     44 #
     45 # Verify data after the test has been "shot"
     46 <verify>
     47 <protocol nocheck="yes">
     48 GET /%TESTNUMBER HTTP/1.1
     49 Host: %HOSTIP:%HTTPPORT
     50 User-Agent: curl/%VERSION
     51 Accept: */*
     52 Upgrade: websocket
     53 Connection: Upgrade
     54 Sec-WebSocket-Version: 13
     55 Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
     56 
     57 </protocol>
     58 <errorcode>
     59 52
     60 </errorcode>
     61 </verify>
     62 </testcase>