#!/bin/sh test_description='test git-http-backend' . ./test-lib.sh if test -n "$NO_CURL"; then skip_all='skipping test, git built without http support' test_done fi LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5561'} . "$TEST_DIRECTORY"/lib-httpd.sh start_httpd GET() { curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out 2>/dev/null && tr '\015' Q act && echo "HTTP/1.1 $2" >exp && test_cmp exp act } POST() { curl --include --data "$2" \ --header "Content-Type: application/x-$1-request" \ "$HTTPD_URL/smart/repo.git/$1" >out 2>/dev/null && tr '\015' Q act && echo "HTTP/1.1 $3" >exp && test_cmp exp act } log_div() { echo >>"$HTTPD_ROOT_PATH"/access.log echo "### $1" >>"$HTTPD_ROOT_PATH"/access.log echo "###" >>"$HTTPD_ROOT_PATH"/access.log } . "$TEST_DIRECTORY"/t556x_common cat >exp <act <"$HTTPD_ROOT_PATH"/access.log && test_cmp exp act ' stop_httpd test_done