git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] http-push: add regression tests

From
Mike Hommey <mh@glandium.org>
Date
Feb 26, 2008, 19:32 UTC
Message-ID
<20080226193206.GC16889@glandium.org>
In-Reply-To
<20080225232820.GA18254@localhost>
On Tue, Feb 26, 2008 at 12:28:20AM +0100, Clemens Buchacher wrote:
Show 11 quoted lines
> http-push tests require a web server with WebDAV support.
> 
> This commit introduces a HTTPD test library, which can be configured using
> the following environment variables.
> 
> LIB_HTTPD_PATH		web server path
> LIB_HTTPD_MODULE_PATH	web server modules path
> LIB_HTTPD_PORT		listening port
> LIB_HTTPD_DAV		enable DAV
> LIB_HTTPD_SVN		enable SVN
> LIB_HTTPD_SSL		enable SSL

Overall, this looks fine to me, though I haven't taken a deep look at what the test itself does. I was more interested in the "library".

Just a few nitpicks.
> +HTTPD_ROOT_PATH="$PWD"/httpd
> +HTTPD_DOCUMENT_ROOT_PATH="$PWD"/httpd/www

Why not just use $HTTPD_ROOT_PATH/www and don't use the $HTTPD_DOCUMENT_ROOT_PATH variable ?

> +	mkdir $HTTPD_ROOT_PATH
> +	mkdir $HTTPD_DOCUMENT_ROOT_PATH
This could become mkdir -p $HTTPD_ROOT_PATH/www
> +	if test -n "$LIB_HTTPD_SSL"
> +	if test "$LIB_HTTPD_SSL" != ""
Why use different tests?
Show 7 quoted lines
> +		openssl req \
> +			-config $TEST_PATH/ssl.cnf \
> +			-new -x509 -nodes \
> +			-out $HTTPD_ROOT_PATH/httpd.pem \
> +			-keyout $HTTPD_ROOT_PATH/httpd.pem
> +		export GIT_SSL_NO_VERIFY=t
> +		HTTPD_PARA="$HTTPD_PARA -DSSL"

For future improvement (that could be another patch), it would probably be nice to generate a CAcert and a certificate signed by it, so we can also test without GIT_SSL_NO_VERIFY.

By the way, why not just include the .pem ?
> +stop_httpd() {
> +	"$LIB_HTTPD_PATH" $HTTPD_PARA -k stop
> +}
As Junio said, it might be good to add a trap.
> +RANDFILE                = $ENV::HOME/.rnd
Wouldn't it be better elsewhere ?
Mike
Previous: Johannes Schindelin
Message 27 of 27 in “http-push: Fix error message for push <remote> :<branch>”
  1. http-push: Fix error message for push <remote> :<branch>Clemens Buchacher, Feb 18, 2008
  2. Johannes SchindelinFeb 18, 2008
  3. http-push: push <remote> :<branch> deletes remote branchClemens Buchacher, Feb 18, 2008
  4. http-push: push <remote> :<branch> deletes remote branchClemens Buchacher, Feb 18, 2008
  5. Johannes SchindelinFeb 18, 2008
  6. Johannes SchindelinFeb 18, 2008
  7. Clemens BuchacherFeb 19, 2008
  8. Johannes SchindelinFeb 19, 2008
  9. Mike HommeyFeb 19, 2008
  10. Johannes SchindelinFeb 19, 2008
  11. Junio C HamanoFeb 19, 2008
  12. Johannes SchindelinFeb 19, 2008
  13. http-push: add regression testsClemens Buchacher, Feb 23, 2008
  14. Mike HommeyFeb 24, 2008
  15. http-push: add regression testsClemens Buchacher, Feb 24, 2008
  16. Mike HommeyFeb 24, 2008
  17. Clemens BuchacherFeb 24, 2008
  18. http-push: add regression testsClemens Buchacher, Feb 25, 2008
  19. Junio C HamanoFeb 26, 2008
  20. http-push: add regression testsClemens Buchacher, Feb 27, 2008
  21. Mike HommeyFeb 27, 2008
  22. Johannes SchindelinFeb 27, 2008
  23. Clemens BuchacherFeb 27, 2008
  24. 1/2 http-push: push <remote> :<branch> deletes remote branchClemens Buchacher, Feb 27, 2008
  25. 2/2 http-push: add regression testsClemens Buchacher, Feb 27, 2008
  26. Johannes SchindelinFeb 27, 2008
  27. Mike HommeyFeb 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.