Override the method used to specify the format for conf files, so we can put an accurate error message in the admin GUI, and test it

This commit is contained in:
Joshua Marantz
2014-08-29 09:13:43 -04:00
parent 6b4a9dc487
commit 7ce289346a
3 changed files with 11 additions and 0 deletions
+5
View File
@@ -77,4 +77,9 @@ SystemRequestContext* NgxServerContext::NewRequestContext(
str_to_string_piece(local_ip));
}
GoogleString NgxServerContext::FormatOption(StringPiece option_name,
StringPiece args) {
return StrCat("pagespeed ", option_name, " ", args, ";");
}
} // namespace net_instaweb
+2
View File
@@ -55,6 +55,8 @@ class NgxServerContext : public SystemServerContext {
return dynamic_cast<NgxMessageHandler*>(message_handler());
}
virtual GoogleString FormatOption(StringPiece option_name, StringPiece args);
private:
NgxRewriteDriverFactory* ngx_factory_;
+4
View File
@@ -2744,6 +2744,10 @@ if [ "$NATIVE_FETCHER" != "on" ]; then
'grep -c /https_gstatic_dot_com/1.gif.pagespeed.ce' 1
fi
start_test Base config has purging disabled. Check error message syntax.
OUT=$($WGET_DUMP "$HOSTNAME/pagespeed_admin/cache?purge=*")
check_from "$OUT" fgrep -q "pagespeed EnableCachePurge on;"
if $USE_VALGRIND; then
# It is possible that there are still ProxyFetches outstanding
# at this point in time. Give them a few extra seconds to allow