Code

Merge branch 'mg/mailmap-update'
[git.git] / t / t9501-gitweb-standalone-http-status.sh
index 992d72961d617d38125862b576de27f46d45e92b..2487da1296da1a2508526f58a2e45fa750c49c8e 100755 (executable)
@@ -15,9 +15,10 @@ code and message.'
 # ----------------------------------------------------------------------
 # snapshot settings
 
-test_commit \
-       'SnapshotTests' \
-       'i can has snapshot?'
+test_expect_success 'setup' "
+       test_commit 'SnapshotTests' 'i can has snapshot?'
+"
+
 
 cat >>gitweb_config.perl <<\EOF
 $feature{'snapshot'}{'override'} = 0;
@@ -115,19 +116,12 @@ test_debug 'cat gitweb.output'
 # ----------------------------------------------------------------------
 # load checking
 
-if test -e /proc/loadavg
-then
-       test_set_prereq PROC_LOADAVG
-else
-       say 'skipping load tests (no /proc/loadavg found)'
-fi
-
 # always hit the load limit
 cat >>gitweb_config.perl <<\EOF
-our $maxload = 0;
+our $maxload = -1;
 EOF
 
-test_expect_success PROC_LOADAVG 'load checking: load too high (default action)' '
+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