Dear Sorin,

first, many-many thanks for your answer :)

On Sat, Nov 02, 2019 at 11:37:26AM +0100, Sorin Manolache wrote:
> On 02/11/2019 11.00, Ervin Hegedüs wrote:
> >Hi,
> >
> >this is just a theoretical question: is there any way to test/use
> >an Apache module without Apache?n
> 
> AFAIK no, but I didn't research it much.

I had a similar feeling :)
 
> There are however best practices that try to come as close as possible to a
> "reasonable" degree of confidence in your code.
> 
> You can separate your code in an application-dependent, apache-independent
> library on one hand and a generic, application-independent, apache-dependent
> glue code on the other hand and then you can test only the
> apache-independent library and "have faith" in your glue code.

the "problem" is that the module what I'ld like to check doesn't
have any separated parts as you described. We can say it's "too
monolithic".
 
> Your application-specific lib may however use the data structures of apache
> (request_rec, server_rec, ap_filter_t) and of libapr (apr_tables, apr_pools
> etc). It's your responsibility however to initialize them in your test code,
> outside your lib. You cannot rely on ap_read_request for instance in order
> to initialize your request_rec structure.

yep, this would be nice, but - as I wrote - the existing module
can't provide this situation :(.

Many thanks again for this confirmation.


a.
 

Reply via email to