quickjs-tart

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

test1938 (1325B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP POST
      6 CURLOPT_AWS_SIGV4
      7 </keywords>
      8 </info>
      9 
     10 # Server-side
     11 <reply>
     12 <data nocheck="yes">
     13 HTTP/1.1 302 OK
     14 Date: Thu, 09 Nov 2010 14:49:00 GMT
     15 Server: test-server/fake
     16 Content-Type: text/html
     17 Content-Length: 0
     18 Location: /%TESTNUMBER0002
     19 
     20 </data>
     21 <data2>
     22 HTTP/1.1 200 OK
     23 Date: Thu, 09 Nov 2010 14:49:00 GMT
     24 Server: test-server/fake
     25 Content-Type: text/html
     26 Content-Length: 0
     27 
     28 </data2>
     29 </reply>
     30 
     31 # Client-side
     32 <client>
     33 <server>
     34 http
     35 </server>
     36 # this relies on the debug feature which allows tests to set the time
     37 <features>
     38 SSL
     39 Debug
     40 crypto
     41 aws
     42 </features>
     43 
     44 <name>
     45 HTTP POST with AWS_SIGV4 for binary data
     46 </name>
     47 <tool>
     48 lib%TESTNUMBER
     49 </tool>
     50 
     51 <command>
     52 http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT
     53 </command>
     54 </client>
     55 
     56 # Verify data after the test has been "shot"
     57 <verify>
     58 <strip>
     59 ^User-Agent:.*
     60 ^Content-Type:.*
     61 ^Accept:.*
     62 </strip>
     63 <protocol nonewline="yes">
     64 POST /%TESTNUMBER/testapi/test HTTP/1.1
     65 Host: 127.0.0.1:9000
     66 Authorization: PROVIDER14-HMAC-SHA256 Credential=keyId/19700101/region/service/provider14_request, SignedHeaders=content-type;host;x-provider2-date, Signature=3436256c7c23adeb66dc15984eaa527edc4a504def61da2e0bf4b01ace4f3c0b
     67 X-Provider2-Date: 19700101T000000Z
     68 Content-Length: 9
     69 
     70 %hex[post%00Data]hex%
     71 </protocol>
     72 </verify>
     73 </testcase>