Simple DEP8 test to actually generate traffic through haproxy
This adds a test that looks simple and maybe unnecessary at first glance, but it would have caught https://github.com/haproxy/haproxy/commit/52dabbc4fad338233c7f0c96f977a43f8f81452a on arm64.
This particular issue is fixed upstream since 1.8.15, and even though we don't usually add DEP8 tests for all regressions, actually exercising the proxy seems like a good idea for such a test.
Here is the last bit of a test run on a debian sid lxd container:
Removing autopkgtest-satdep (0) ...
autopkgtest [11:59:17]: test proxy-localhost: [-----------------------
+ cat
+ systemctl restart haproxy
+ sed s,/var/www/html/,,
+ md5sum /var/www/html/index.html
+ src_md5=e2620d4a5a0f8d80dd4b16de59af981f index.html
+ rm -f index.html
+ wget -t1 http://localhost:8080 -O index.html
--2019-01-29 13:59:17-- http://localhost:8080/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10701 (10K) [text/html]
Saving to: ‘index.html’
0K .......... 100% 167M=0s
2019-01-29 13:59:17 (167 MB/s) - ‘index.html’ saved [10701/10701]
+ result=0
+ + echo e2620d4a5a0f8d80dd4b16de59af981f index.html
md5sum -c
+ [ 0 != 0 ]
+ echo OK: index.html downloaded via haproxy matches the source file.
+ exit 0
index.html: OK
OK: index.html downloaded via haproxy matches the source file.
autopkgtest [11:59:17]: test proxy-localhost: -----------------------]
autopkgtest [11:59:17]: test proxy-localhost: - - - - - - - - - - results - - - - - - - - - -
proxy-localhost PASS
autopkgtest [11:59:18]: @@@@@@@@@@@@@@@@@@@@ summary
cli PASS
proxy-localhost PASS
Edited by Andreas Hasenack