Added test600 and test601, SFTP and SCP file retrieval tests.
authorDan Fandrich <dan@coneharvesters.com>
Mon, 26 Mar 2007 18:04:05 +0000 (18:04 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Mon, 26 Mar 2007 18:04:05 +0000 (18:04 +0000)
tests/README
tests/data/test600 [new file with mode: 0644]
tests/data/test601 [new file with mode: 0644]

index 7e7e632..11d42d4 100644 (file)
@@ -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 (file)
index 0000000..5b56c74
--- /dev/null
@@ -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 (file)
index 0000000..bd39460
--- /dev/null
@@ -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>