perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkal...@apache.org
Subject svn commit: r1497237 - in /perl/modperl/branches/httpd24/t: api/access2.t api/access2_24.t response/TestAPI/access2_24.pm
Date Thu, 27 Jun 2013 08:19:21 GMT
Author: jkaluza
Date: Thu Jun 27 08:19:20 2013
New Revision: 1497237

URL: http://svn.apache.org/r1497237
Log:
Split also t/api/access2.t for httpd-2.4 and httpd-2.2

Added:
    perl/modperl/branches/httpd24/t/api/access2_24.t
Modified:
    perl/modperl/branches/httpd24/t/api/access2.t
    perl/modperl/branches/httpd24/t/response/TestAPI/access2_24.pm

Modified: perl/modperl/branches/httpd24/t/api/access2.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/t/api/access2.t?rev=1497237&r1=1497236&r2=1497237&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/t/api/access2.t (original)
+++ perl/modperl/branches/httpd24/t/api/access2.t Thu Jun 27 08:19:20 2013
@@ -5,6 +5,8 @@ use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
 
+if (!have_min_apache_version("2.4.0")) {
+
 plan tests => 6, need need_lwp, need_auth, need_access, 'HTML::HeadParser';
 
 my $location = "/TestAPI__access2";
@@ -27,4 +29,6 @@ ok GET_OK $location, username => 'goo', 
 ok POST_OK $location, username => 'bar', password => 'goopass1',
     content => "a";
 
+}
+
 

Added: perl/modperl/branches/httpd24/t/api/access2_24.t
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/t/api/access2_24.t?rev=1497237&view=auto
==============================================================================
--- perl/modperl/branches/httpd24/t/api/access2_24.t (added)
+++ perl/modperl/branches/httpd24/t/api/access2_24.t Thu Jun 27 08:19:20 2013
@@ -0,0 +1,32 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+use Apache::TestRequest;
+
+if (have_min_apache_version("2.4.0")) {
+
+plan tests => 6, need need_lwp, need_auth, need_access, 'HTML::HeadParser';
+
+my $location = "/TestAPI__access2";
+
+ok !GET_OK $location;
+
+my $rc = GET_RC $location;
+ok t_cmp $rc, 401, "no credentials passed";
+
+# bad user
+ok !GET_OK $location, username => 'root', password => '1234';
+
+# good user/bad pass
+ok !GET_OK $location, username => 'goo', password => 'foo';
+
+# good user/good pass
+ok GET_OK $location, username => 'goo', password => 'goopass';
+
+# any user/any pass POST works
+ok POST_OK $location, username => 'bar', password => 'goopass1',
+    content => "a";
+
+}

Modified: perl/modperl/branches/httpd24/t/response/TestAPI/access2_24.pm
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/t/response/TestAPI/access2_24.pm?rev=1497237&r1=1497236&r2=1497237&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/t/response/TestAPI/access2_24.pm (original)
+++ perl/modperl/branches/httpd24/t/response/TestAPI/access2_24.pm Thu Jun 27 08:19:20 2013
@@ -1,4 +1,4 @@
-package TestAPI::access2;
+package TestAPI::access2_24;
 
 # testing $r->requires
 # in the POST test it returns:



Mime
View raw message