Integration tests for HAProxy

Problems

HAProxy is one of the most important pieces of infrastructure in our architecture. Recently, it receives a lot of changes. For each change, we have to bring up a system locally or in DO to test manually. Most of the tests inside the gitlab-haproxy cookbook are configuration tests. They test the configurations generated when switching some flags. They don't actually test the behaviors when applying the configurations in a real HAProxy system. That's why touching HAProxy is fragile. We made a lot of mistakes:

Therefore, it's essential to have an integration test suite that assert the behaviors of HAProxy under the default attributes and when some configurations are set.

Solutions

The overall idea is to bring up a HAProxy, write some mocking backends, triggers real HTTP calls, and assert the behaviors. I'm note quite sure about the solution, gonna clarify in future.

cc @cmiskell