From 5efc48dcf1b133dd415c759e83b21d52dc303786 Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Fri, 11 Jun 2021 19:56:15 +0200 Subject: [PATCH] REGTESTS: Replace REQUIRE_VERSION=2.5 with 'haproxy -cc' This is safe, because running `haproxy -cc 'version_atleast(2.5-dev0)'` on HAProxy 2.4 will also result in an exit code of 1. --- reg-tests/http-messaging/http_abortonclose.vtc | 2 +- reg-tests/ssl/new_del_ssl_cafile.vtc | 2 +- reg-tests/ssl/new_del_ssl_crlfile.vtc | 2 +- reg-tests/ssl/set_ssl_cafile.vtc | 2 +- reg-tests/ssl/set_ssl_crlfile.vtc | 2 +- reg-tests/ssl/show_ssl_ocspresponse.vtc | 2 +- reg-tests/startup/check_condition.vtc | 1 - 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/reg-tests/http-messaging/http_abortonclose.vtc b/reg-tests/http-messaging/http_abortonclose.vtc index 49cdaeadd1..c083f29f1a 100644 --- a/reg-tests/http-messaging/http_abortonclose.vtc +++ b/reg-tests/http-messaging/http_abortonclose.vtc @@ -4,7 +4,7 @@ feature ignore_unknown_macro # NOTE : This test may fail if too many vtest are running in parallel because # the port reserved for closed s1 server may be reused by another vtest -#REQUIRE_VERSION=2.5 +feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'" #REGTEST_TYPE=slow # b1 : Don't send /c4 before /c3 was received by s2 server diff --git a/reg-tests/ssl/new_del_ssl_cafile.vtc b/reg-tests/ssl/new_del_ssl_cafile.vtc index 613e128665..f943a6632e 100644 --- a/reg-tests/ssl/new_del_ssl_cafile.vtc +++ b/reg-tests/ssl/new_del_ssl_cafile.vtc @@ -9,7 +9,7 @@ # - Check that you have socat varnishtest "Test the 'new ssl ca-file' and 'del ssl ca-file' commands of the CLI" -#REQUIRE_VERSION=2.5 +feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'" #REQUIRE_OPTIONS=OPENSSL #REQUIRE_BINARIES=socat feature ignore_unknown_macro diff --git a/reg-tests/ssl/new_del_ssl_crlfile.vtc b/reg-tests/ssl/new_del_ssl_crlfile.vtc index 0d82200e7f..027f00096f 100644 --- a/reg-tests/ssl/new_del_ssl_crlfile.vtc +++ b/reg-tests/ssl/new_del_ssl_crlfile.vtc @@ -9,7 +9,7 @@ # - Check that you have socat varnishtest "Test the 'new ssl crl-file' and 'del ssl crl-file' commands of the CLI" -#REQUIRE_VERSION=2.5 +feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'" #REQUIRE_OPTIONS=OPENSSL #REQUIRE_BINARIES=socat feature ignore_unknown_macro diff --git a/reg-tests/ssl/set_ssl_cafile.vtc b/reg-tests/ssl/set_ssl_cafile.vtc index eb625639bf..2f4ef2e8a8 100644 --- a/reg-tests/ssl/set_ssl_cafile.vtc +++ b/reg-tests/ssl/set_ssl_cafile.vtc @@ -15,7 +15,7 @@ # - Check that you have socat varnishtest "Test the 'set ssl ca-file' feature of the CLI" -#REQUIRE_VERSION=2.5 +feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'" #REQUIRE_OPTIONS=OPENSSL #REQUIRE_BINARIES=socat feature ignore_unknown_macro diff --git a/reg-tests/ssl/set_ssl_crlfile.vtc b/reg-tests/ssl/set_ssl_crlfile.vtc index 7060a1477c..d3aad9065c 100644 --- a/reg-tests/ssl/set_ssl_crlfile.vtc +++ b/reg-tests/ssl/set_ssl_crlfile.vtc @@ -18,7 +18,7 @@ # - Check that you have socat varnishtest "Test the 'set ssl crl-file' feature of the CLI" -#REQUIRE_VERSION=2.5 +feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'" #REQUIRE_OPTIONS=OPENSSL #REQUIRE_BINARIES=socat feature ignore_unknown_macro diff --git a/reg-tests/ssl/show_ssl_ocspresponse.vtc b/reg-tests/ssl/show_ssl_ocspresponse.vtc index b7a2d51051..a942f2c478 100644 --- a/reg-tests/ssl/show_ssl_ocspresponse.vtc +++ b/reg-tests/ssl/show_ssl_ocspresponse.vtc @@ -19,7 +19,7 @@ # - Check that you have socat varnishtest "Test the 'show ssl ocsp-response' and 'show ssl cert foo.pem.ocsp' features of the CLI" -#REQUIRE_VERSION=2.5 +feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'" #REQUIRE_OPTIONS=OPENSSL #REQUIRE_BINARIES=socat feature ignore_unknown_macro diff --git a/reg-tests/startup/check_condition.vtc b/reg-tests/startup/check_condition.vtc index 7d3324bfee..d56d73fde9 100644 --- a/reg-tests/startup/check_condition.vtc +++ b/reg-tests/startup/check_condition.vtc @@ -1,6 +1,5 @@ varnishtest "Tests the -cc argument" -#REQUIRE_VERSION=2.5 feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'" shell {