]> granicus.if.org Git - curl/commitdiff
Added tests 1082 through 1085 to test symbolic --interface parameters
authorDan Fandrich <dan@coneharvesters.com>
Wed, 8 Oct 2008 21:46:55 +0000 (21:46 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 8 Oct 2008 21:46:55 +0000 (21:46 +0000)
CHANGES
tests/data/Makefile.am
tests/data/test1045
tests/data/test1046
tests/data/test1082 [new file with mode: 0644]
tests/data/test1083 [new file with mode: 0644]
tests/data/test1084 [new file with mode: 0644]
tests/data/test1085 [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index c0759c029d405a54e4816b63dd2497e85bc4a515..99899eae8b7c482b01873cd5668b6a3340b715f5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@
 
                                   Changelog
 
+Daniel Fandrich (8 Oct 2008)
+- Added tests 1082 through 1085 to test symbolic --interface parameters
+
 Daniel Stenberg (8 Oct 2008)
 - Igor filed bug #2111613 (http://curl.haxx.se/bug/view.cgi?id=2111613) that
   eventually identified a flaw in how the multi_socket interface in some cases
index a7b4fc1fb5937ed7f4fd0afc6b22d4b3bc6c1e9d..fa02c5a54491a76123b0266f98f8b9824c20607a 100644 (file)
@@ -58,7 +58,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46           \
  test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063   \
  test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071   \
  test1072 test1073 test1074 test1075 test1076 test1077 test1078 test1079   \
- test1080 test1081
+ test1080 test1081 test1082 test1083 test1084 test1085
 
 filecheck:
        @mkdir test-place; \
index 97f3a7297e126aeb35bdd696de15ec202aac9e03..fa8ad4b4480866d032ee60557049ea8837343922 100644 (file)
@@ -29,7 +29,7 @@ Content-Type: text/plain
 http
 </server>
  <name>
-HTTP GET with localhost --interface
+HTTP GET with numeric localhost --interface
  </name>
  <command>
 http://%HOSTIP:%HTTPPORT/1045 --interface %CLIENTIP
index 59da6dce4743b0b4b7c51f98470a923774f14cad..bc4e5c293ddcac623dad6a7e8c4ac253654d5293 100644 (file)
@@ -33,7 +33,7 @@ ipv6
 http-ipv6
 </server>
  <name>
-HTTP-IPv6 GET with localhost --interface
+HTTP-IPv6 GET with numeric localhost --interface
  </name>
  <command>
 -g "http://%HOST6IP:%HTTP6PORT/1046" --interface ::1
diff --git a/tests/data/test1082 b/tests/data/test1082
new file mode 100644 (file)
index 0000000..d58dd25
--- /dev/null
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--interface
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Mon, 28 Jul 2008 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Length: 6\r
+Connection: close\r
+Content-Type: text/plain\r
+\r
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET with localhost --interface
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1082 --interface localhost
+</command>
+<precheck>
+perl -e "print 'Test requires default test server host address' if ( '%CLIENTIP' ne '127.0.0.1' );"
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1082 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1083 b/tests/data/test1083
new file mode 100644 (file)
index 0000000..4a21b9a
--- /dev/null
@@ -0,0 +1,59 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--interface
+IPv6
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Date: Mon, 28 Jul 2008 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Length: 6\r
+Connection: close\r
+Content-Type: text/plain\r
+\r
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+ipv6
+</features>
+<server>
+http-ipv6
+</server>
+ <name>
+HTTP-IPv6 GET with ip6-localhost --interface
+ </name>
+ <command>
+-g "http://%HOST6IP:%HTTP6PORT/1083" --interface ip6-localhost
+</command>
+<precheck>
+perl -e "print 'Test requires default test server host address' if ( '%CLIENT6IP' ne '[::1]' );" && ./server/resolve --ipv6 ip6-localhost
+</precheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1083 HTTP/1.1\r
+Host: %HOST6IP:%HTTP6PORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1084 b/tests/data/test1084
new file mode 100644 (file)
index 0000000..fdaa16a
--- /dev/null
@@ -0,0 +1,37 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--interface
+FAILURE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+HTTP GET with invalid --interface
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1084 --interface non-existing-host.haxx.se.
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+7
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1085 b/tests/data/test1085
new file mode 100644 (file)
index 0000000..a69a9db
--- /dev/null
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--interface
+IPv6
+FAILURE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+ipv6
+</features>
+<server>
+none
+</server>
+ <name>
+HTTP-IPv6 GET with invalid --interface
+ </name>
+ <command>
+-g "http://%HOST6IP:%HTTP6PORT/1085" --interface non-existing-host.haxx.se.
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+7
+</errorcode>
+</verify>
+</testcase>