You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by do...@apache.org on 2002/01/10 18:51:48 UTC

cvs commit: httpd-test/perl-framework/t/apache etags.t

dougm       02/01/10 09:51:48

  Modified:    perl-framework/t/apache etags.t
  Log:
  this test does not work with 2.0
  
  Revision  Changes    Path
  1.2       +2 -16     httpd-test/perl-framework/t/apache/etags.t
  
  Index: etags.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/etags.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- etags.t	5 Jan 2002 17:20:33 -0000	1.1
  +++ etags.t	10 Jan 2002 17:51:48 -0000	1.2
  @@ -8,20 +8,6 @@
   use Apache::TestRequest;
   use Apache::TestUtil;
   
  -t_debug "Checking for existence of FileETag directive\n";
  -my $resp = GET('/etags/test.txt');
  -my $rc = $resp->code;
  -t_debug "Returned $rc:";
  -if ($rc == 500) {
  -    t_debug "Feature not supported, skipping..",
  -        " Message was:", $resp->as_string;
  -    if (defined($resp->content)) {
  -        t_debug $resp->content;
  -    }
  -    plan tests => 1..0;
  -    exit;
  -}
  -
   #
   # The tests verify the inclusion of the different fields, and
   # inheritance, according to the directories involved.  All are
  @@ -136,14 +122,14 @@
                );
   
   my $testcount = scalar(keys(%tests));
  -plan tests => $testcount;
  +plan tests => $testcount, sub { have_apache(1) };
   
   for my $key (keys(%tests)) {
       my $uri = "/etags" . $key . "test.txt";
       my $pattern = $tests{$key};
       t_debug "---", "HEAD $uri",
           "Expecting " . $expect{$pattern};
  -    $resp = HEAD($uri);
  +    my $resp = HEAD($uri);
       my $etag = $resp->header("ETag");
       if (defined($etag)) {
           t_debug "Received $etag";
  
  
  

Re: cvs commit: httpd-test/perl-framework/t/apache etags.t

Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 10 Jan 2002, Rodent of Unusual Size wrote:

> Doug MacEachern wrote:
> > 
> > well, i said it was incomplete, MMN need to be checked too.
> 
> I saw that you added it, but I'm not sure how to check it..

my $config = Apache::Test::config();
my $info = $config->{httpd_info};

my $major = $info->{MODULE_MAGIC_NUMBER_MAJOR};
my $minor = $info->{MODULE_MAGIC_NUMBER_MINOR};

print "major=$major, minor=$minor\n";

> > skipping a test based on a 500 response code is bogus if you
> > ask me.
> 
> Why?

you can't be sure what threw the 500 response.  but chances are probably
slim in this case it'd be something other than the directive isn't
available.  so no biggie.


Re: cvs commit: httpd-test/perl-framework/t/apache etags.t

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Doug MacEachern wrote:
> 
> well, i said it was incomplete, MMN need to be checked too.

I saw that you added it, but I'm not sure how to check it..

> skipping a test based on a 500 response code is bogus if you
> ask me.

Why?

> > The real issue is: why doesn't an invalid .htaccess file cause
> > a 500 on 2.0?  *That's* what needs to be solved.
> 
> maybe because there is no .htaccess file that applies to
> /etags/test.txt

D'OH!
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

Re: cvs commit: httpd-test/perl-framework/t/apache etags.t

Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 10 Jan 2002, Rodent of Unusual Size wrote:

> Um, but it's going to work with 2.0.  Please revert your patch
> because it's broken.  The test for a 500 return allows the
> test to skip on versions of Apache that don't have the directive
> (like 1.3.22).  Your change will cause the skip to be a failure
> instead.

well, i said it was incomplete, MMN need to be checked too.  and once its
supported in 2.0 the condition can be updated to reflect that.  skipping a
test based on a 500 response code is bogus if you ask me.  but isn't worth
fussing over, so i just backed it out.
 
> The real issue is: why doesn't an invalid .htaccess file cause
> a 500 on 2.0?  *That's* what needs to be solved.

maybe because there is no .htaccess file that applies to /etags/test.txt




Re: cvs commit: httpd-test/perl-framework/t/apache etags.t

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
dougm@apache.org wrote:
> 
>   this test does not work with 2.0

Um, but it's going to work with 2.0.  Please revert your patch
because it's broken.  The test for a 500 return allows the
test to skip on versions of Apache that don't have the directive
(like 1.3.22).  Your change will cause the skip to be a failure
instead.

The real issue is: why doesn't an invalid .htaccess file cause
a 500 on 2.0?  *That's* what needs to be solved.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

Re: cvs commit: httpd-test/perl-framework/t/apache etags.t

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
dougm@apache.org wrote:
> 
>   this test does not work with 2.0

Does now..
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"