Fw: Use Test::Nginx with etcproxy and/or valgrind (Was Re: Test::Nginx::LWP vs. Test::Nginx::Socket)

agentzh agentzh at gmail.com
Wed Mar 16 10:06:41 MSK 2011

On Tue, Mar 15, 2011 at 11:13 PM, Antoine Bonavita (personal)
<antoine.bonavita at gmail.com> wrote:
> I actually wrote a few posts on the migration to Test::Nginx:
> * http://www.nginx-discovery.com/2011/03/day-32-moving-to-testnginx.html
> * http://www.nginx-discovery.com/2011/03/day-33-testnginx-pipelinedrequests.html

I've just read through your posts. And I do understand all those
frustrations involved ;)

You're very welcome to provide patches for bug fixes, new features,
and documentation and I'm very willing to give you a commit bit to the
test-nginx repository :)

> * Being able to run multiple requests in one test. The
> pipelined_requests use the same connection which might not be what I
> want. I was thinking of something more natural like : send request 1,
> wait for response 1, check response 1, send request 2, wait for
> response 2, check response 2, etc.

After reading your posts, I now understand your actual requirement
here a bit more. In our tests, we usually make use of nginx
subrequests to achieve similar results, though not exactly the same

    === TEST 1:
    --- config
         location /foo { ... }
         location /main {
              echo_subrequest POST /foo -b 'correct value';
              echo_subrequest POST /foo -b 'bad value';
              echo_subrequest POST /foo -b 'correct value';
    --- request
         GET /main
    --- response_body

I agree this is not ideal though ;) We've been using this paradigm extensively.


More information about the nginx-devel mailing list