From 8464a00a77993ccd06719f1cdf1ca9557c3de7fe Mon Sep 17 00:00:00 2001 From: Joshua Marantz Date: Mon, 18 May 2015 09:46:12 -0400 Subject: [PATCH] nginx system test changes to repro issue https://github.com/pagespeed/mod_pagespeed/issues/1077 --- test/nginx_system_test.sh | 4 +++- test/pagespeed_test.conf.template | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/test/nginx_system_test.sh b/test/nginx_system_test.sh index 9d8b99cd6..1632756aa 100644 --- a/test/nginx_system_test.sh +++ b/test/nginx_system_test.sh @@ -301,7 +301,9 @@ BEACON_HANDLER="ngx_pagespeed_beacon" STATISTICS_URL=http://$PRIMARY_HOSTNAME/ngx_pagespeed_statistics # An expected failure can be indicated like: "~In-place resource optimization~" -PAGESPEED_EXPECTED_FAILURES="" +PAGESPEED_EXPECTED_FAILURES=" +~Cache purging with PageSpeed off in vhost, but on in directory.~ +" if [ "$POSITION_AUX" = "true" ] ; then PAGESPEED_EXPECTED_FAILURES+=" diff --git a/test/pagespeed_test.conf.template b/test/pagespeed_test.conf.template index ebd8f69b4..dfa5db8bf 100644 --- a/test/pagespeed_test.conf.template +++ b/test/pagespeed_test.conf.template @@ -1243,13 +1243,33 @@ http { pagespeed EnableCachePurge on; pagespeed PurgeMethod PURGE; - root "@@SERVER_ROOT@@"; + root "@@SERVER_ROOT@@/mod_pagespeed_test/purge"; pagespeed FileCachePath "@@FILE_CACHE@@_purge"; pagespeed DisableFilters add_instrumentation; pagespeed RewriteLevel PassThrough; pagespeed EnableFilters rewrite_css; } + server { + listen @@SECONDARY_PORT@@; + listen [::]:@@SECONDARY_PORT@@; + server_name psoff-dir-on.example.com; + + # Test purging individual URLs without flushing the entire metadata cache. + pagespeed EnableCachePurge on; + + pagespeed PurgeMethod PURGE; + root "@@SERVER_ROOT@@/mod_pagespeed_test/purge"; + pagespeed FileCachePath "@@FILE_CACHE@@_dir_on"; + pagespeed DisableFilters add_instrumentation; + pagespeed RewriteLevel PassThrough; + pagespeed EnableFilters rewrite_css; + pagespeed off; + location / { + pagespeed on; + } + } + server { listen @@SECONDARY_PORT@@; listen [::]:@@SECONDARY_PORT@@;