* always run with a clean cache
* in the future we should structure the tests so they run twice, once with a clean cache and then again with a populated one, but for now a clean cache should catch more bugs
* stop requiring a file cache path for tests; just use
* fix exit codes to match documentation at the top of the file: 1 is a test failure, 2 is bad args
Squash-merge of my #198.
We are going to need some nginx-specific system tests, and this seemed like a
good place to start. This adds two tests, as well as some infrastructure. With
Squash-merge of my #194 and #195
Because we're a non-blocking server we need to run a scheduler thread or else
alerts we set might not fire. We need to be careful to start it after we fork.
Better long term would be to use an nginx timer and avoid the extra thread;
tracking this in #111.
Fixes#55
The pagespeed api for handling logs has changed, we need to change with it in
order to build against the latest pagespeed optimization libraries.
Separately, a new test was added to the generic system test that depends on the
property cache (insert_dns_prefetch). We've not ported the property cache yet,
so this test will fail, and I've added it to the list of failing tests.
Requests to:
/ngx_pagespeed_static/...
can be handled synchronously by pagespeed. They're used for support files for
optimizations, like js_defer.js.
This also includes a couple refactors:
- I pulled most of NgxBaseFetch::CopyBufferToNginx() out into
ngx_http_pagespeed_string_piece_to_buffer_chain().
- ngx_http_pagespeed_create_request_context() now returns a
CreateRequestContext::Response which gives callers more detailed information
about the request.
- I also pulled ngx_http_pagespeed_set_cache_control() out of
ngx_http_pagespeed_header_filter().
Fixes issue #62.