Code

Merge git://repo.or.cz/git-gui
[git.git] / t / t9501-gitweb-standalone-http-status.sh
index 9e8bc01ea6e96a9263c31fd6563416727075a072..d196cc5ca93b07bcf20e4629455ea7f03b0907c7 100755 (executable)
@@ -112,4 +112,26 @@ test_expect_success 'snapshots: bad object id' '
 test_debug 'cat gitweb.output'
 
 
+# ----------------------------------------------------------------------
+# load checking
+
+# always hit the load limit
+cat >>gitweb_config.perl <<\EOF
+our $maxload = -1;
+EOF
+
+test_expect_success 'load checking: load too high (default action)' '
+       gitweb_run "p=.git" &&
+       grep "Status: 503 Service Unavailable" gitweb.headers &&
+       grep "503 - The load average on the server is too high" gitweb.body
+'
+test_debug 'cat gitweb.log' # just in case
+test_debug 'cat gitweb.headers'
+
+# turn off load checking
+cat >>gitweb_config.perl <<\EOF
+our $maxload = undef;
+EOF
+
+
 test_done