REGTESTS: server: test SSL/PROXY with checks for dynamic servers

Complete the dynamic servers regtest to ensure there is no implicit
interaction for checks and SSL/PROXY server settings.
diff --git a/reg-tests/server/cli_add_check_server.vtc b/reg-tests/server/cli_add_check_server.vtc
index 31d4d61..9f48c0d 100644
--- a/reg-tests/server/cli_add_check_server.vtc
+++ b/reg-tests/server/cli_add_check_server.vtc
@@ -48,6 +48,18 @@
 
 	barrier b1 sync
 	barrier b2 sync
+
+	recv
+	expect ~ ".*Server be1/s4 is UP/READY \\(leaving forced maintenance\\)."
+	recv
+	expect ~ "Health check for server be1/s4 failed"
+
+	barrier b1 sync
+
+	recv
+	expect ~ ".*Server be1/s5 is UP/READY \\(leaving forced maintenance\\)."
+	recv
+	expect ~ "Health check for server be1/s5 succeeded."
 } -start
 
 haproxy h1 -conf {
@@ -58,6 +70,11 @@
 		option log-health-checks
 		option httpchk GET /
 		log ${S1_addr}:${S1_port} daemon
+
+	frontend fe-proxy
+		mode http
+		bind "fd@${hapsrv}" accept-proxy
+		http-request return status 200
 } -start
 
 # check on a functional server
@@ -117,4 +134,28 @@
 	expect ~ "Server deleted."
 }
 
+# check PROXY protocol interaction with checks
+haproxy h1 -cli {
+	# no explicit check-send-proxy
+	# The health check should failed.
+	send "add server be1/s4 ${h1_hapsrv_addr}:${h1_hapsrv_port} send-proxy check rise 1 fall 1"
+	expect ~ "New server registered."
+
+	send "enable server be1/s4"
+	expect ~ ".*"
+	send "enable health be1/s4"
+	expect ~ ".*"
+
+	barrier b1 sync
+
+	# explicit check-send-proxy : health check should succeeded
+	send "add server be1/s5 ${h1_hapsrv_addr}:${h1_hapsrv_port} send-proxy check rise 1 fall 1 check-send-proxy"
+	expect ~ "New server registered."
+
+	send "enable server be1/s5"
+	expect ~ ".*"
+	send "enable health be1/s5"
+	expect ~ ".*"
+}
+
 syslog S1 -wait