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

Re: Use mongoose to test smart-http unconditionally?

From
Jeff King <peff@peff.net>
Date
Dec 5, 2013, 02:49 UTC
Message-ID
<20131205024938.GA19376@sigill.intra.peff.net>
In-Reply-To
<xmqq38m8jkiu.fsf@gitster.dls.corp.google.com>
On Wed, Dec 04, 2013 at 02:53:13PM -0800, Junio C Hamano wrote:
> If it involves making things not tested with apache, I'd actually be
> less supportive for the whole plan.

I hadn't really considered that angle. Apache is a much more realistic real-world deployment. We give advice for it in git-http-backend(1), and the tests do check that that advice works (OTOH, we also give advice for lighttpd, but that is not checked in the test scripts).

> I thought the primary objective was to encourage people who currently
> are _not_ running httpd tests by making a lightweight server available
> out of the box, robbing an excuse "my box does not have apache
> installed" from them.

Whether we get rid of apache or not, I think a new lightweight server would fulfill that goal. I just did not want the maintenance burden of managing multiple configs (and our test harness apache config has grown non-trivial).

Show 5 quoted lines
> As long as a server supports bog standard CGI interface, smart-http
> should work the same way with any such server.  For that reason, it
> should be theoretically sufficient to test with one non-apache
> server (i.e. mongoose) for the purpose of making sure _our_ end of
> the set-up works, but still...

There are definitely subtleties between servers. For example, when I worked on fetching bundles over http a while back, there was a big difference between lighttpd and apache. A request for "http://example.com/foo.bundle/info/refs" would return the bundle under lighttpd, but not under apache (for an apache server, we would have to make a fallback request). The client needs to be able to handle both scenarios gracefully.

That's a case where it would be nice to be able to test _both_ cases, and that may be an argument for having multiple (or trying to configure apache to do both behaviors). But it shows that there may be subtle differences between a fake test server and a real deployment.

So thinking on it more, I'm somewhat less enthusiastic about mongoose.
-Peff
Previous: Junio C Hamano
Message 10 of 10 in “Use mongoose to test smart-http unconditionally?”
  1. Duy NguyenDec 4, 2013
  2. Shawn PearceDec 4, 2013
  3. Jeff KingDec 4, 2013
  4. Jonathan NiederDec 4, 2013
  5. Duy NguyenDec 5, 2013
  6. Jeff KingDec 5, 2013
  7. Junio C HamanoDec 4, 2013
  8. Jeff KingDec 4, 2013
  9. Junio C HamanoDec 4, 2013
  10. Jeff KingDec 5, 2013

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.