diff options
| author | Dan Fandrich <dan@coneharvesters.com> | 2007-03-26 18:04:05 +0000 | 
|---|---|---|
| committer | Dan Fandrich <dan@coneharvesters.com> | 2007-03-26 18:04:05 +0000 | 
| commit | 844f5b6b459878acf7ac3256a3612defa4573ba3 (patch) | |
| tree | 5bae4ec3d2ac778b70e9d77299fd690a8476476d | |
| parent | 424063235bfd55ad6d6f42fd50ba66f247eea064 (diff) | |
Added test600 and test601, SFTP and SCP file retrieval tests.
| -rw-r--r-- | tests/README | 9 | ||||
| -rw-r--r-- | tests/data/test600 | 44 | ||||
| -rw-r--r-- | tests/data/test601 | 44 | 
3 files changed, 95 insertions, 2 deletions
diff --git a/tests/README b/tests/README index 7e7e63242..11d42d415 100644 --- a/tests/README +++ b/tests/README @@ -10,6 +10,7 @@ Requires:    perl (and a unix-style shell)    diff (when a test fail, a diff is shown)    stunnel (for HTTPS and FTPS tests) +  sshd (for SCP and SFTP tests; OpenSSH ver. 3.9 is known to work)  TCP ports used: @@ -21,9 +22,12 @@ TCP ports used:    - 8993 on localhost for FTPS tests    - 8996 on localhost for FTP IPv6 tests    - 8997 on localhost for TFTP tests +  - 8999 on localhost for SCP/SFTP tests    The test suite runs simple FTP, HTTP and TFTP servers on these ports to -  which it makes requests. +  which it makes requests.  For SSL tests, it runs stunnel to handle +  encryption to the regular servers. For SSH, it runs a standard OpenSSH +  server.  Run:    'make test'. This invokes the 'runtests.pl' perl script. Edit the top @@ -82,6 +86,7 @@ TEST CASE NUMBERS   300 - 399   HTTPS   400 - 499   FTPS   500 - 599   libcurl source code tests, not using the curl command tool + 600 - 699   SCP/SFTP   Since 30-apr-2003, there's nothing in the system that requires us to keep   within these number series. Each test case now specifies its own server @@ -89,4 +94,4 @@ TEST CASE NUMBERS  TODO: -  * Add tests for TELNET, LDAP, DICT, SCP, SFTP... +  * Add tests for TELNET, LDAP, DICT... diff --git a/tests/data/test600 b/tests/data/test600 new file mode 100644 index 000000000..5b56c748e --- /dev/null +++ b/tests/data/test600 @@ -0,0 +1,44 @@ +<testcase> +<info> +<keywords> +SFTP +</keywords> +</info> + +# +# Server-side +<reply> +<data mode="text"> +Test data +for ssh test +</data> +</reply> + +# +# Client-side +<client> +<server> +sftp +</server> + <name> +SFTP retrieval + </name> + <command> +--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT/%PWD/log/file600.txt +</command> +<file name="log/file600.txt"> +Test data +for ssh test +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +</protocol> +<valgrind> +disable +</valgrind> +</verify> +</testcase> diff --git a/tests/data/test601 b/tests/data/test601 new file mode 100644 index 000000000..bd394608a --- /dev/null +++ b/tests/data/test601 @@ -0,0 +1,44 @@ +<testcase> +<info> +<keywords> +SCP +</keywords> +</info> + +# +# Server-side +<reply> +<data mode="text"> +Test data +for ssh test +</data> +</reply> + +# +# Client-side +<client> +<server> +scp +</server> + <name> +SCP retrieval + </name> + <command> +--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT/%PWD/log/file601.txt +</command> +<file name="log/file601.txt"> +Test data +for ssh test +</file> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<protocol> +</protocol> +<valgrind> +disable +</valgrind> +</verify> +</testcase>  | 
