httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r348445 - /httpd/test/trunk/perl-framework/t/ssl/env.t
Date Wed, 23 Nov 2005 14:15:27 GMT
Author: jorton
Date: Wed Nov 23 06:15:22 2005
New Revision: 348445

URL: http://svn.apache.org/viewcvs?rev=348445&view=rev
Log:
- check response status to make failure due to non-2xx
response obvious

Modified:
    httpd/test/trunk/perl-framework/t/ssl/env.t

Modified: httpd/test/trunk/perl-framework/t/ssl/env.t
URL: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/ssl/env.t?rev=348445&r1=348444&r2=348445&view=diff
==============================================================================
--- httpd/test/trunk/perl-framework/t/ssl/env.t (original)
+++ httpd/test/trunk/perl-framework/t/ssl/env.t Wed Nov 23 06:15:22 2005
@@ -1,6 +1,7 @@
 use strict;
 use warnings FATAL => 'all';
 use Apache::Test;
+use Apache::TestUtil;
 use Apache::TestRequest;
 use Apache::TestConfig ();
 use Apache::TestSSLCA ();
@@ -19,19 +20,27 @@
 
 my $url = '/ssl-cgi/env.pl';
 
-my $tests = (keys(%$server_expect) + keys(%$client_expect)) * 2;
+my $tests = (keys(%$server_expect) + keys(%$client_expect) + 1) * 2;
 plan tests => $tests, need need_cgi, need_lwp;
 
 Apache::TestRequest::scheme('https');
 
-my $env = getenv(GET_STR($url));
+my $r = GET($url);
+
+ok t_cmp($r->code, 200, "response status OK");
+
+my $env = getenv($r->as_string);
 
 verify($env, $server_expect);
 verify($env, $client_expect, 1);
 
 $url = '/require-ssl-cgi/env.pl';
 
-$env = getenv(GET_STR($url, cert => $cert));
+$r = GET($url, cert => $cert);
+
+ok t_cmp($r->code, 200, "second response status OK");
+
+$env = getenv($r->as_string);
 
 verify($env, $server_expect);
 verify($env, $client_expect);



Mime
View raw message