quickjs-tart

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

test3032 (1891B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 --location
      6 </keywords>
      7 </info>
      8 
      9 # Server-side
     10 <reply>
     11 
     12 <data>
     13 HTTP/1.1 301 redirect swsbounce
     14 Content-Length: 0
     15 Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     16 Part: data
     17 
     18 </data>
     19 
     20 <data1>
     21 HTTP/1.1 301 redirect swsbounce
     22 Content-Length: 0
     23 Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     24 Part: data1
     25 
     26 </data1>
     27 
     28 <data2>
     29 HTTP/1.1 301 redirect swsbounce
     30 Content-Length: 0
     31 Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     32 Part: data2
     33 
     34 </data2>
     35 
     36 <data3>
     37 HTTP/1.1 200 OK
     38 Content-Type: text/html
     39 Content-Length: 30
     40 Part: data3
     41 
     42 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     43 </data3>
     44 
     45 <datacheck>
     46 HTTP/1.1 301 redirect swsbounce
     47 Content-Length: 0
     48 Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     49 Part: data
     50 
     51 HTTP/1.1 301 redirect swsbounce
     52 Content-Length: 0
     53 Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     54 Part: data1
     55 
     56 HTTP/1.1 301 redirect swsbounce
     57 Content-Length: 0
     58 Location: http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     59 Part: data2
     60 
     61 HTTP/1.1 200 OK
     62 Content-Type: text/html
     63 Content-Length: 30
     64 Part: data3
     65 
     66 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     67 </datacheck>
     68 
     69 </reply>
     70 
     71 # Client-side
     72 <client>
     73 <server>
     74 http
     75 </server>
     76 # This is a test of the swsbounce keyword which is used during tests to
     77 # override the data response number for the next request to the previous
     78 # data response number + 1. eg data, data1, data2 etc.
     79 <name>
     80 HTTP redirect loop 3x swsbounce test
     81 </name>
     82 <command>
     83 --location http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     84 </command>
     85 </client>
     86 
     87 # Verify data after the test has been "shot"
     88 <verify>
     89 <protocol>
     90 GET /%TESTNUMBER HTTP/1.1
     91 Host: %HOSTIP:%HTTPPORT
     92 User-Agent: curl/%VERSION
     93 Accept: */*
     94 
     95 GET /%TESTNUMBER HTTP/1.1
     96 Host: %HOSTIP:%HTTPPORT
     97 User-Agent: curl/%VERSION
     98 Accept: */*
     99 
    100 GET /%TESTNUMBER HTTP/1.1
    101 Host: %HOSTIP:%HTTPPORT
    102 User-Agent: curl/%VERSION
    103 Accept: */*
    104 
    105 GET /%TESTNUMBER HTTP/1.1
    106 Host: %HOSTIP:%HTTPPORT
    107 User-Agent: curl/%VERSION
    108 Accept: */*
    109 
    110 </protocol>
    111 </verify>
    112 </testcase>