httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Benson <gben...@redhat.com>
Subject Re: TestConfig->new deletes vhosts (et al)
Date Wed, 05 Sep 2001 17:45:30 GMT

On Wed, 5 Sep 2001, Doug MacEachern wrote:

> On Mon, 3 Sep 2001, Gary Benson wrote:
>
> >
> > Hi all,
> >
> > I'm getting problems with tests passing if I run:
> >
> > % perl t/TEST
> >
> > but failing if I run:
> >
> > % perl t/TEST -start-httpd
> > % perl t/TEST -run-tests
> > % perl t/TEST -stop-httpd
>
> works fine for me.
>
> > It seems that this chunk of code, from TestConfig.pm (~ line 140), is the
> > culprit. It deletes the section of the config file that contains the
> > virtual host stuff, which breaks the tests which need them.
> >
> >     #regenerating config, so forget old
> >     if ($args->{save}) {
> >         for (qw(vhosts inherit_config modules inc)) {
> >             delete $thaw->{$_} if exists $thaw->{$_};
> >         }
> >     }
> >
> > Does anyone know _why_ it deletes the vhosts stuff -- is it required by
> > something else, or was it once required but not any more?
>
> that should only happen when configuration is being generated, in which
> case the vhosts will be rediscovered.  things like apxs are canidates for
> reuse from the old config.  otherwise, cached config is used and that bit
> is not run.  i wonder if you have something in your shell env that is
> triggering reconfiguration, such as:
> my %passenv = map { $_,1 } qw{
> APXS APACHE APACHE_GROUP APACHE_USER APACHE_PORT
> };

APACHE_PORT is set.

Should I explicitly set APACHE_PORT _only_ for t/TEST -start-httpd? Eg:

% APACHE_PORT=whatever t/TEST -start-httpd
% perl t/TEST -run-tests
% perl t/TEST -stop-httpd

But looking more closely, I see that there is a -port option. Perhaps
that makes more sense...

Okay, thanks for that,
Gary

[ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]


Mime
View raw message