quickjs-tart

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

test2005 (829B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 netrc
      6 </keywords>
      7 </info>
      8 #
      9 # Server-side
     10 <reply>
     11 <data>
     12 HTTP/1.1 200 OK
     13 Date: Fri, 05 Aug 2022 10:09:00 GMT
     14 Server: test-server/fake
     15 Content-Type: text/plain
     16 Content-Length: 6
     17 Connection: close
     18 
     19 -foo-
     20 </data>
     21 </reply>
     22 
     23 #
     24 # Client-side
     25 <client>
     26 <server>
     27 http
     28 </server>
     29 <name>
     30 netrc match with password only in file, no username. machine follows
     31 </name>
     32 <command>
     33 --netrc-optional --netrc-file %LOGDIR/netrc%TESTNUMBER http://%HOSTIP:%HTTPPORT/
     34 </command>
     35 <file name="%LOGDIR/netrc%TESTNUMBER" >
     36 machine %HOSTIP
     37 password 5up3r53cr37
     38 
     39 machine example.com
     40 </file>
     41 </client>
     42 
     43 #
     44 # Verify data after the test has been "shot"
     45 <verify>
     46 <protocol>
     47 GET / HTTP/1.1
     48 Host: %HOSTIP:%HTTPPORT
     49 Authorization: Basic %b64[:5up3r53cr37]b64%
     50 User-Agent: curl/%VERSION
     51 Accept: */*
     52 
     53 </protocol>
     54 </verify>
     55 </testcase>