Hi Aleks,

On Fri, Sep 15, 2017 at 06:29:42PM +0200, Aleksandar Lazic wrote:
> Hi.
> 
> Willy Tarreau wrote on 15.09.2017:
> 
> > On Fri, Sep 15, 2017 at 06:36:20PM +0500, ???? ??????? wrote:
> >> I'd say, it's chicken and egg situation. Whichever comes first, tests or 
> >> CI.
> >> if we start a CI with "just build", it will evolve, people will start
> >> writing tests (I beleive so)
> 
> > I tend to believe it as well. However what I'm less convinced about is
> > the long term maintenance of such an infrastructure. People tend to
> > volunteer to set up stuff initially because it improves a situation but
> > after 3 or 4 years they have other things to do and nobody maintains
> > what they built anymore. We've seen this in the past with other stuff
> > like a translated version of the web site for example. It's more
> > important to spot who is willing to step up on this and to be sure to
> > maintain it for a while and at least long enough to pass it to someone
> > else once they start to get fed up.
> 
> I have created a build ci on gitlab.
> 
> https://gitlab.com/aleks001/haproxy17-centos/tree/master
> 
> The test would be very difficult due to the fact that you should have at 
> least a backend <-> haproxy <-> client and what Test should be run?

Hehe welcome to the real world guys ;-)

Yes testing an intermediary is a real pain as it requires acting on both
sides at once. When you look at tests/test-fsm.cfg you start to realize
the type of pain it is, and this file doesn't even test 0.1% of the
internals, it just validates that we didn't break too much something
very obvious.

> When you take a look into the features of haproxy ;-) it's a huge task.
> 
> I suggest to use caddy as simple webserver or can we use the error_file 
> function to deliver some content from haproxy?

I tend to use netcat, openssl, socat, curl, httpterm, inject, haproxy
(yes, itself). Also writing config files involving multiple features at
once by chaining instances works pretty well (ie ssl, proxy protocol
etc). But even then it's a pain and it tests very very little of it.

I once had an interesting discussion with PHK who proposed to extend
the varnish test program to also cover haproxy so that we could write
various test cases, as he wrote this tool to address exactly the same
issue. It could be an option, but I didn't have time (nor do I now) to
look into that.

Cheers,
Willy

Reply via email to