From 75318a3bad4b7a25f617217891bfbcec26a9161a Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 25 Feb 2009 03:32:08 -0500 Subject: test scripts: refactor start_httpd helper There are some redirects and some error checking that need to be done by the caller; let's move both into the start_httpd function so that all callers don't have to repeat them (there is only one caller now, but another will follow in this series). This doesn't violate any assumptions that aren't already being made by lib-httpd, which is happy to say "skipping" and call test_done for a number of other cases. Signed-off-by: Jeff King Signed-off-by: Jay Soffian Signed-off-by: Junio C Hamano --- t/t5540-http-push.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 't/t5540-http-push.sh') diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh index 11b343274f..57a4411e98 100755 --- a/t/t5540-http-push.sh +++ b/t/t5540-http-push.sh @@ -20,13 +20,7 @@ then fi . "$TEST_DIRECTORY"/lib-httpd.sh - -if ! start_httpd >&3 2>&4 -then - say "skipping test, web server setup failed" - test_done - exit -fi +start_httpd test_expect_success 'setup remote repository' ' cd "$ROOT_PATH" && -- cgit v1.2.3 From 119c8eeede81489b2ce8b26ae7dcb47290e257eb Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 25 Feb 2009 03:32:09 -0500 Subject: add basic http clone/fetch tests This was mostly being tested implicitly by the "http push" tests. But making a separate test script means that: - we will run fetch tests even when http pushing support is not built - when there are failures on fetching, they are easier to see and isolate, as they are not in the middle of push tests This script defaults to running the webserver on port 5550, and puts the original t5540 on port 5540, so that the two can be run simultaneously without conflict (but both still respect an externally set LIB_HTTPD_PORT). Signed-off-by: Jeff King Signed-off-by: Jay Soffian Signed-off-by: Junio C Hamano --- t/t5540-http-push.sh | 1 + 1 file changed, 1 insertion(+) (limited to 't/t5540-http-push.sh') diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh index 57a4411e98..cefab4543a 100755 --- a/t/t5540-http-push.sh +++ b/t/t5540-http-push.sh @@ -11,6 +11,7 @@ This test runs various sanity checks on http-push.' ROOT_PATH="$PWD" LIB_HTTPD_DAV=t +LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5540'} if git http-push > /dev/null 2>&1 || [ $? -eq 128 ] then -- cgit v1.2.3 From 5dba35912474770d0df45ed801d78c4c9ed5e949 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 3 Apr 2009 15:31:10 -0400 Subject: tests: remove exit after test_done call test_done always exits, so this line is never executed. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t5540-http-push.sh | 1 - 1 file changed, 1 deletion(-) (limited to 't/t5540-http-push.sh') diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh index c46592f03d..5fe479e1c2 100755 --- a/t/t5540-http-push.sh +++ b/t/t5540-http-push.sh @@ -17,7 +17,6 @@ if git http-push > /dev/null 2>&1 || [ $? -eq 128 ] then say "skipping test, USE_CURL_MULTI is not defined" test_done - exit fi . "$TEST_DIRECTORY"/lib-httpd.sh -- cgit v1.2.3