]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: ssl: be more verbose with ocsp_compat_check.vtc
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 7 May 2024 12:06:45 +0000 (14:06 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 15 May 2024 08:36:02 +0000 (10:36 +0200)
the ocsp_compat_check.vtc reg-test is difficult to debug given than the
haproxy output is piped in `grep -q`.

This patch helps by showing the haproxy output as well as the return
code.

reg-tests/ssl/ocsp_compat_check.vtc

index f54c3ada40b3501f691d86bce0300a0512b6df8f..088dbf3d50a101fe88838d981fa69f7233ae3b2c 100644 (file)
@@ -49,7 +49,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 1"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -77,7 +79,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 2"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -105,7 +109,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 3"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -134,7 +140,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 4"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -163,7 +171,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 5"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -192,7 +202,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 6"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -222,7 +234,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 7"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -252,7 +266,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 8"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -282,7 +298,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 9"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -312,7 +330,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 10"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -342,7 +362,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 11"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }
 
@@ -372,7 +394,9 @@ EOF
 
     haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
     haproxy_ret=$?
-
+    echo "==== test 12"
+    echo "$haproxy_output"
+    echo "HAProxy return code: $haproxy_ret"
     ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate"
 }