You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2017/06/28 13:08:41 UTC
svn commit: r1800162 - in /httpd/test/framework/trunk/t: conf/extra.conf.in
modules/proxy.t
Author: jim
Date: Wed Jun 28 13:08:41 2017
New Revision: 1800162
URL: http://svn.apache.org/viewvc?rev=1800162&view=rev
Log:
Test that we read the content correctly as well for unix domain socket tests
Modified:
httpd/test/framework/trunk/t/conf/extra.conf.in
httpd/test/framework/trunk/t/modules/proxy.t
Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/extra.conf.in?rev=1800162&r1=1800161&r2=1800162&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Wed Jun 28 13:08:41 2017
@@ -286,7 +286,7 @@
ProxyPass /reverse/ http://@SERVERNAME@:@PORT@/
ProxyPassReverse /reverse/ http://@SERVERNAME@:@PORT@/
<IfVersion >= 2.4.7>
- ProxyPass /uds unix:/tmp/test-ptf.sock|http:
+ ProxyPass /uds/ unix:/tmp/test-ptf.sock|http:
</IfVersion>
<Location /reverse/locproxy/>
ProxyPass http://@SERVERNAME@:@PORT@/
Modified: httpd/test/framework/trunk/t/modules/proxy.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/proxy.t?rev=1800162&r1=1800161&r2=1800162&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/proxy.t (original)
+++ httpd/test/framework/trunk/t/modules/proxy.t Wed Jun 28 13:08:41 2017
@@ -7,7 +7,7 @@ use Apache::TestUtil;
use Apache::TestConfig ();
use Misc;
-my $num_tests = 20;
+my $num_tests = 21;
if (have_min_apache_version('2.4.7')) {
$num_tests++;
}
@@ -119,8 +119,8 @@ sub uds_script
if (accept(my $new_sock, $server)) {
my $data = <$new_sock>;
print $new_sock "HTTP/1.0 200 OK\r\n";
- print $new_sock "Content-Type: text/html\r\n\r\n";
- print $new_sock "<html><body><h1>Hello World</h1><pre>$data</pre></body></html>\n";
+ print $new_sock "Content-Type: text/plain\r\n\r\n";
+ print $new_sock "hello world\n";
close $new_sock;
}
unlink($socket_path);
@@ -145,5 +145,9 @@ if (have_min_apache_version('2.4.7')) {
}
$r = GET("/uds/");
ok t_cmp($r->code, 200, "ProxyPass UDS path");
+ my $c = $r->content;
+ chomp $c;
+ ok t_cmp($c, "hello world", "UDS content OK");
+
}
Re: svn commit: r1800162 - in /httpd/test/framework/trunk/t:
conf/extra.conf.in modules/proxy.t
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Wed, Jun 28, 2017 at 8:08 AM, <ji...@apache.org> wrote:
> Author: jim
> Date: Wed Jun 28 13:08:41 2017
> New Revision: 1800162
>
> --- httpd/test/framework/trunk/t/modules/proxy.t (original)
> +++ httpd/test/framework/trunk/t/modules/proxy.t Wed Jun 28 13:08:41 2017
> @@ -7,7 +7,7 @@ use Apache::TestUtil;
> use Apache::TestConfig ();
> use Misc;
>
> -my $num_tests = 20;
> +my $num_tests = 21;
> if (have_min_apache_version('2.4.7')) {
> $num_tests++;
> }
> @@ -119,8 +119,8 @@ sub uds_script
> if (accept(my $new_sock, $server)) {
> my $data = <$new_sock>;
> print $new_sock "HTTP/1.0 200 OK\r\n";
> - print $new_sock "Content-Type: text/html\r\n\r\n";
> - print $new_sock "<html><body><h1>Hello World</h1><pre>$data</pre></body></html>\n";
> + print $new_sock "Content-Type: text/plain\r\n\r\n";
> + print $new_sock "hello world\n";
> close $new_sock;
> }
> unlink($socket_path);
> @@ -145,5 +145,9 @@ if (have_min_apache_version('2.4.7')) {
> }
> $r = GET("/uds/");
> ok t_cmp($r->code, 200, "ProxyPass UDS path");
> + my $c = $r->content;
> + chomp $c;
> + ok t_cmp($c, "hello world", "UDS content OK");
> +
> }
>
>
That's problematic, your counting was skewed;
t/modules/proxy.t ................... Failed 1/21 subtests
(less 3 skipped subtests: 17 okay)
I expect you wanted to tickle the count += 2 in place of ++ in the line below?
t/modules/proxy_fcgi.t .............. Can't exec "php-fpm": No such
file or directory at t/modules/proxy_fcgi.t line 11.
t/modules/proxy_fcgi.t .............. skipped: cannot find module
'mod_proxy_fcgi'
This one is odd, shouldn't we skip all proxy_fcgi.t the moment
mod_proxy_fcgi is absent, rather that hunting for the php-fpm
component?