1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-04 08:35:05 -05:00
Commit Graph

94 Commits

Author SHA1 Message Date
Daniel Stenberg
a7452b8b8c sws: support extracting test number from CONNECT ipv6-address!
If an ipv6-address is provided to CONNECT, the last hexadecimal group in
the address will be used as the test number! For example the address
"[1234::ff]" would be treated as test case 255.
2013-06-04 22:50:58 +02:00
Daniel Stenberg
51b0f09b5e runtests.pl: support nonewline="yes" in client/stdin sections 2013-05-07 22:52:43 +02:00
Daniel Stenberg
c5ba0c2f54 FTP: handle a 230 welcome response
...instead of the 220 we otherwise expect.

Made the ftpserver.pl support sending a custom "welcome" and then
created test 1219 to verify this fix with such a 230 welcome.

Bug: http://curl.haxx.se/mail/lib-2013-02/0102.html
Reported by: Anders Havn
2013-04-12 23:59:37 +02:00
Daniel Stenberg
1e29d275c6 test1509: verify proxy header response headers count
Modified sws to support and use custom CONNECT responses instead of the
previously naive hard-coded version. Made the HTTP test server able to
extract test case number from the host name in a CONNECT request by
finding the number after the last dot. It makes 'machine.moo.123' use
test case 123.

Adapted a larger amount of tests to the new <connect> style.

Bug: http://curl.haxx.se/bug/view.cgi?id=1204
Reported by: Martin Jansen
2013-03-27 15:30:46 +01:00
Yang Tse
1700668d78 tests: add #96 #558 and #1330
These verfy that the 'memory tracking' subsystem is actually doing its
job when using curl tool (#96), a test in libtest (#558) and also a unit
test (#1330), in order to prevent regressions in this functionallity.
2013-03-15 19:59:51 +01:00
Daniel Stenberg
e4b733e3f1 HTTP proxy: insert slash in URL if missing
curl has been accepting URLs using slightly wrong syntax for a long
time, such as when completely missing as slash "http://example.org" or
missing a slash when a query part is given
"http://example.org?q=foobar".

curl would translate these into a legitimate HTTP request to servers,
although as was shown in bug #1206 it was not adjusted properly in the
cases where a HTTP proxy was used.

Test 1213 and 1214 were added to the test suite to verify this fix.

The test HTTP server was adjusted to allow us to specify test number in
the host name only without using any slashes in a given URL.

Bug: http://curl.haxx.se/bug/view.cgi?id=1206
Reported by: ScottJi
2013-03-15 14:18:16 +01:00
Daniel Stenberg
1b0477a5a9 FILEFORMAT: the FTP commands work for more protocols 2012-09-04 19:41:09 +02:00
Daniel Stenberg
685366006c connection-monitor: always log disconnect when enabled
This makes verifying easier and makes us more sure curl closes the
connection only at the correct point in time. Adjusted test 206 and 1008
accordingly and updated the docs for it.
2012-07-12 00:08:37 +02:00
Daniel Stenberg
6398c8bba8 FILEFORMAT: provided a full description of connection-monitor 2012-07-05 11:24:23 +02:00
Daniel Stenberg
28dc509dde sws: add 'connection-monitor' command support
Using this, the server will output in the protocol log when the
connection gets disconnected and thus we will verify correctly in the
test cases that the connection doesn't get closed prematurely. This is
important for example NTLM to work.

Documentation added to FILEFORMAT, test 503 updated to use this.
2012-07-05 11:24:23 +02:00
Tatsuhiro Tsujikawa
7292486ec3 tests: Added Metalink test case # 2005 2012-06-21 04:16:53 +02:00
Daniel Stenberg
82180643f4 test proxy supports CONNECT
There's a new 'http-proxy' server for tests that runs on a separate port
and lets clients do HTTP CONNECT to other ports on the same host to
allow us to test HTTP "tunneling" properly.

Test cases now have a <proxy> section in <verify> to check that the
proxy protocol part matches correctly.

Test case 80, 83, 95, 275, 503 and 1078 have been converted. Test 1316
was added.
2012-01-03 15:01:22 +01:00
Colin Hogben
7111ca6f5f Correct substitution var names
Two variable names were wrong in the documentation.
2011-12-15 17:27:51 +01:00
Yang Tse
1958fe5745 test harness: non-stunnel https server integration overhaul 2011-10-06 20:26:42 +02:00
Daniel Stenberg
c4142034ff runtests.pl: support option=no-include 2011-08-04 17:36:00 +02:00
Daniel Stenberg
b9313af838 runtests: add 'debug' as a feature a test can require 2011-07-19 23:49:40 +02:00
Dan Fandrich
3427bece89 Mention axTLS in some more documentation 2011-01-21 14:27:10 -08:00
Quinn Slack
59cf93ccdb TLS-SRP: support added when using GnuTLS 2011-01-19 20:35:02 +01:00
Daniel Stenberg
c43ad0f972 unittests: a dedicated feature in tests
The test runner script now knows if unittests can run and the unit test
setup file says it is one. I also made runtests.pl deal with no
<command> tag set, so that the description file can get even simpler.
2011-01-03 22:42:46 +01:00
Daniel Stenberg
a4765b0551 runtests: allow tests written as perl scripts
If a command is set type="perl", it can now specify a perl program that will
be run instead of an ordinary curl or built tool.

A perl test automatically disables memory and valgrind debugging.
2010-11-03 11:22:46 +01:00
Dan Fandrich
15622e69a9 sws: Added writedelay HTTP server command
This delays between write operations, hopefully making it easier
to spot problems where libcurl doesn't flush the socket properly
before waiting for the next response.
2010-10-02 00:21:59 +02:00
Daniel Stenberg
7427acc472 mention missing test servers for <server> 2010-04-10 23:27:04 +02:00
Yang Tse
35fbeda003 Test suite support for RTSP 2010-02-01 12:05:08 +00:00
Dan Fandrich
2091fe530f Added missing NTLM feature for test 1097 2009-05-30 04:34:11 +00:00
Dan Fandrich
14b6cc4e22 Always use nocheck="yes" for consistency 2009-01-07 21:57:26 +00:00
Dan Fandrich
640974fb28 If a HTTP request is Basic and num is already >=1000, the HTTP test server
adds 1 to num to get the data section to return. This allows testing
authentication negotiations using the Basic authentication method.
2008-11-25 23:23:47 +00:00
Dan Fandrich
dc31387c6f SLOWDOWN actually causes a 0.01 second delay between bytes 2008-10-30 01:44:18 +00:00
Dan Fandrich
357383159e A <precheck> command is considered to have failed if it returns a non-zero
return code.  This way, if the precheck command can't be run at all for
whatever reason, it's treated as a precheck failure which causes the
test to be skipped.
2008-10-15 17:41:02 +00:00
Daniel Stenberg
c67a99ff27 - When libcurl was doing a HTTP POST and the server would respond with
"Connection: close" and actually close the connection after the
  response-body, libcurl could still have outstanding data to send and it
  would not properly notice this and stop sending. This caused weirdness and
  sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222

  Note that there are still reasons to consider libcurl's behavior when
  getting a >= 400 response code while sending data, as Craig Perras' note
  "http upload: how to stop on error" specifies:
  http://curl.haxx.se/mail/archive-2008-08/0138.html
2008-08-29 10:47:59 +00:00
Dan Fandrich
b6b03c8ab9 Added feature in runtests.pl to select tests based on key word. 2008-07-27 02:34:27 +00:00
Dan Fandrich
45edad84cb Document that variable replacement now takes place in the test file <stdout> section. 2008-05-01 17:48:00 +00:00
Yang Tse
113d0937de Add 'timeout' and 'delay' attributes support for the test harness <command> subsection 2008-04-25 04:19:50 +00:00
Dan Fandrich
80cec5a62a Fixed the test harness so it will write out zero-length data files. 2008-03-06 01:11:43 +00:00
Dan Fandrich
fcb2595ed6 "yes" must be in quotes to be XML compatible 2008-01-04 23:57:39 +00:00
Daniel Stenberg
fe0d7aee49 Daniel Egger provided 'nonewline=yes' support for the <stdout> section 2008-01-04 23:31:04 +00:00
Dan Fandrich
15feb8217f Fixed the 2000-series tests so that the downloaded data is actually checked 2007-10-27 01:04:36 +00:00
Dan Fandrich
4686adb433 Added variable substitution to the <verify><file> section.
Made a few more tests work remotely.
2007-09-20 20:39:17 +00:00
Dan Fandrich
048c74f2fa Added %CLIENTIP and %CLIENT6IP data file substitution variables.
Added hooks to the test suite to make it possible to test a curl running
on a remote host.
2007-09-17 21:42:01 +00:00
Dan Fandrich
6fd1cfeab1 Minor updates 2007-09-05 17:17:59 +00:00
Dan Fandrich
9537580ba2 Allow ftp server alternate replies to contain backslash-escaped control
characters.
2007-08-23 23:24:39 +00:00
Daniel Stenberg
a466b31574 Daniel Black's test suite fixes and initial test cases for SOCKS4/5 using
openssh
2007-06-05 13:50:59 +00:00
Dan Fandrich
5187faeeb9 Improved the test harness to allow running test servers on other than
the default port numbers, allowing more than one test suite to run
simultaneously on the same host.
2007-04-30 20:15:33 +00:00
Dan Fandrich
28dde78dde Added <postcheck> support to the test harness. 2007-04-23 22:58:45 +00:00
Dan Fandrich
37171809f6 Mention NSS, <postcmd> commands 2007-04-23 21:18:30 +00:00
Dan Fandrich
b7131009fb Changed the test harness to attempt to gracefully shut down servers
before resorting to the kill -9 hammer.

Added test harness infrastructure to support scp/sftp tests, using
OpenSSH as the server.
2007-03-24 01:01:28 +00:00
Daniel Stenberg
0c817b6614 language fix 2007-03-18 23:16:36 +00:00
Dan Fandrich
e12d46ac50 Updated the test harness to add a new "crypto" feature check and updated the
appropriate test case to use it.  For now, this is treated the same as the
"SSL" feature because curl doesn't list it separately.
2007-03-09 23:39:42 +00:00
Dan Fandrich
1962ebf8e7 Updated the test harness to check for protocol support before running each
test, fixing KNOWN_BUGS #11.  Fixed some tests to more accurately specify
their required servers and features.
2007-03-09 21:01:39 +00:00
Dan Fandrich
7c144d5a7e Made a few cleanups. 2007-03-08 20:00:28 +00:00
Dan Fandrich
33bea767eb Convert (most of) the test data files into genuine XML. A handful still
are not, due mainly to the lack of support for XML character entities
(e.g. & => &amp; ).  This will make it easier to validate test files using
tools like xmllint, as well as edit and view them using XML tools.
2007-01-23 02:25:56 +00:00