]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: proxy: complete "del backend" test flx04/master
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 6 Aug 2026 15:18:08 +0000 (17:18 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 6 Aug 2026 15:18:08 +0000 (17:18 +0200)
A recent fix was introduced for "del backend" on 3.4 when deleting the
first proxy declared in the configuration. This issue does not affect
the current development tree.

To ensure this case is safe, complete backend deletion reg-test with a
deletion on the first declared proxy. This could prevent any future
regression for this particular case.

This should be backported up to 3.4.

reg-tests/proxy/cli_del_backend.vtc

index bcbc1a4c17e5f8fe48ec759416cf77f03f61b873..d256b91dd8e3a741a1bffd0ece3b5a479d3408ee 100644 (file)
@@ -14,6 +14,8 @@ haproxy h1 -conf {
                timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
                timeout server  "${HAPROXY_TEST_TIMEOUT-5s}"
 
+       backend be_first
+
        frontend fe
                bind "fd@${feS}"
                use_backend be_ref
@@ -67,6 +69,10 @@ haproxy h1 -cli {
 
        send "show stat be 2 -1"
        expect !~ "be,BACKEND,"
+
+       # ensures freeing the first declared proxy is safe
+       send "unpublish backend be_first; del backend be_first"
+       expect ~ "Backend deleted."
 }
 
 haproxy h1 -cli {