From: Frédéric Lécaille Date: Fri, 29 Mar 2019 15:13:48 +0000 (+0100) Subject: REGTEST: adapt some reg tests after renaming. X-Git-Tag: v2.0-dev3~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b894f9230cadc4b1dce59f90f4f6c501978b921a;p=thirdparty%2Fhaproxy.git REGTEST: adapt some reg tests after renaming. Some reg tests and their dependencies have been renamed. They may be referenced by the .vtc files. So, this patch modifies also the references to these dependencies. --- diff --git a/reg-tests/compression/lua_validation.vtc b/reg-tests/compression/lua_validation.vtc index c3be36e667..6e8c1e8796 100644 --- a/reg-tests/compression/lua_validation.vtc +++ b/reg-tests/compression/lua_validation.vtc @@ -10,7 +10,7 @@ feature ignore_unknown_macro haproxy h1 -conf { global # log stdout format short daemon - lua-load ${testdir}/s00000.lua + lua-load ${testdir}/lua_validation.lua defaults mode http diff --git a/reg-tests/http-rules/converters_ipmask_concat_strcmp_field_word.vtc b/reg-tests/http-rules/converters_ipmask_concat_strcmp_field_word.vtc index 019e32ecf1..1f15052638 100644 --- a/reg-tests/http-rules/converters_ipmask_concat_strcmp_field_word.vtc +++ b/reg-tests/http-rules/converters_ipmask_concat_strcmp_field_word.vtc @@ -173,7 +173,7 @@ haproxy h2 -conf { http-request set-header Okwordtest %[var(sess.okword)] #OK http-request set-var(sess.qsword) url_param(qs),word(1,_,2) #Yes_It http-request set-header Qswordtest %[var(sess.qsword)] #Yes_It - http-request set-header Qswordregmtest %[var(sess.qsword),map_regm(${testdir}/h00002.map)] #It_Yes + http-request set-header Qswordregmtest %[var(sess.qsword),map_regm(${testdir}/converters_ipmask_concat_strcmp_field_word.map)] #It_Yes http-request set-header Wordtest2 %[var(sess.fieldhdr),word(2,_,0)] #f2_f3__f5 http-request set-header Wordtest3 %[var(sess.fieldconcat),word(3,_,2)] #f3__f5 http-request set-header Wordtest4 %[hdr(Fieldconcat2),word(-2,_,3)] #f1_f2_f3 diff --git a/reg-tests/http-rules/map_redirect.vtc b/reg-tests/http-rules/map_redirect.vtc index 5bf94fc210..57f83dc4fc 100644 --- a/reg-tests/http-rules/map_redirect.vtc +++ b/reg-tests/http-rules/map_redirect.vtc @@ -46,19 +46,19 @@ haproxy h1 -conf { bind "fd@${fe1}" # redirect Host: example.org / subdomain.example.org - http-request redirect prefix %[req.hdr(Host),lower,regsub(:\d+$,,),map_str(${testdir}/h00003.map)] code 301 if { hdr(Host),lower,regsub(:\d+$,,),map_str(${testdir}/h00003.map) -m found } + http-request redirect prefix %[req.hdr(Host),lower,regsub(:\d+$,,),map_str(${testdir}/map_redirect.map)] code 301 if { hdr(Host),lower,regsub(:\d+$,,),map_str(${testdir}/map_redirect.map) -m found } # set var and redirect in be1 - http-request set-var(txn.testvar) req.hdr(Testvar),lower,regsub(:\d+$,,),map_str(${testdir}/h00003.map) if { hdr(Testvar),lower,regsub(:\d+$,,),map_str(${testdir}/h00003.map) -m found } + http-request set-var(txn.testvar) req.hdr(Testvar),lower,regsub(:\d+$,,),map_str(${testdir}/map_redirect.map) if { hdr(Testvar),lower,regsub(:\d+$,,),map_str(${testdir}/map_redirect.map) -m found } # use map to select backend (no default map value) - use_backend %[req.hdr(Host),lower,map_dom(${testdir}/h00003-be.map)] if { hdr_dom(Host) -i test1.example.com || hdr_dom(Host) -i test2.example.com } + use_backend %[req.hdr(Host),lower,map_dom(${testdir}/map_redirect-be.map)] if { hdr_dom(Host) -i test1.example.com || hdr_dom(Host) -i test2.example.com } # use map to select backend with default value(test3_be) - use_backend %[req.hdr(Host),lower,map_dom(${testdir}/h00003-be.map,test3_be)] if { hdr_dom(Host) -m end -i example.com } + use_backend %[req.hdr(Host),lower,map_dom(${testdir}/map_redirect-be.map,test3_be)] if { hdr_dom(Host) -m end -i example.com } # use map(after del map test1.example.com) default value(test4_be) - use_backend %[req.hdr(Host),lower,map_dom(${testdir}/h00003-be.map,test4_be)] if { hdr_dom(Host) -m end -i example.invalid } + use_backend %[req.hdr(Host),lower,map_dom(${testdir}/map_redirect-be.map,test4_be)] if { hdr_dom(Host) -m end -i example.invalid } default_backend be1 @@ -146,29 +146,29 @@ client c7 -connect ${h1_fe1_sock} { # cli show maps haproxy h1 -cli { - send "show map ${testdir}/h00003.map" + send "show map ${testdir}/map_redirect.map" expect ~ "^0x[a-f0-9]+ example\\.org https://www\\.example\\.org\\n0x[a-f0-9]+ subdomain\\.example\\.org https://www\\.subdomain\\.example\\.org\\n$" - send "show map ${testdir}/h00003-be.map" + send "show map ${testdir}/map_redirect-be.map" expect ~ "^0x[a-f0-9]+ test1\\.example\\.com test1_be\\n0x[a-f0-9]+ test1\\.example\\.invalid test1_be\\n0x[a-f0-9]+ test2\\.example\\.com test2_be\\n$" } haproxy h1 -cli { - # clear map ${testdir}/h00003.map - send "clear map ${testdir}/h00003.map" + # clear map ${testdir}/map_redirect.map + send "clear map ${testdir}/map_redirect.map" expect ~ "^\\n" - send "show map ${testdir}/h00003.map" + send "show map ${testdir}/map_redirect.map" expect ~ "^\\n" - # del map ${testdir}/h00003-be.map test1.example.{com,invalid} - send "del map ${testdir}/h00003-be.map test1.example.com" + # del map ${testdir}/map_redirect-be.map test1.example.{com,invalid} + send "del map ${testdir}/map_redirect-be.map test1.example.com" expect ~ "^\\n" - send "del map ${testdir}/h00003-be.map test1.example.invalid" + send "del map ${testdir}/map_redirect-be.map test1.example.invalid" expect ~ "^\\n" - send "show map ${testdir}/h00003-be.map" + send "show map ${testdir}/map_redirect-be.map" expect ~ "^0x[a-f0-9]+ test2\\.example\\.com test2_be\\n$" } diff --git a/reg-tests/http-rules/map_regm_with_backref.vtc b/reg-tests/http-rules/map_regm_with_backref.vtc index 8fd39f7662..502e8d376f 100644 --- a/reg-tests/http-rules/map_regm_with_backref.vtc +++ b/reg-tests/http-rules/map_regm_with_backref.vtc @@ -57,9 +57,9 @@ haproxy h1 -conf { # Store host header in variable http-request set-var(txn.host) req.hdr(Host) # This works correctly - http-request set-header X-Mapped-From-Header %[req.hdr(Host),map_regm(${testdir}/b00000.map,"unknown")] + http-request set-header X-Mapped-From-Header %[req.hdr(Host),map_regm(${testdir}/map_regm_with_backref.map,"unknown")] # This breaks before commit 271022150d7961b9aa39dbfd88e0c6a4bc48c3ee - http-request set-header X-Mapped-From-Var %[var(txn.host),map_regm(${testdir}/b00000.map,"unknown")] + http-request set-header X-Mapped-From-Var %[var(txn.host),map_regm(${testdir}/map_regm_with_backref.map,"unknown")] default_backend be1 diff --git a/reg-tests/lua/bad_http_clt_req_duration.vtc b/reg-tests/lua/bad_http_clt_req_duration.vtc index 427613362e..a31f7d73f8 100644 --- a/reg-tests/lua/bad_http_clt_req_duration.vtc +++ b/reg-tests/lua/bad_http_clt_req_duration.vtc @@ -41,7 +41,7 @@ syslog Slog { haproxy h1 -conf { global - lua-load ${testdir}/b00001.lua + lua-load ${testdir}/bad_http_clt_req_duration.lua defaults timeout client 1s diff --git a/reg-tests/lua/close_wait_lf.vtc b/reg-tests/lua/close_wait_lf.vtc index 26e71ad441..98492ee8e8 100644 --- a/reg-tests/lua/close_wait_lf.vtc +++ b/reg-tests/lua/close_wait_lf.vtc @@ -30,7 +30,7 @@ haproxy h1 -conf { timeout connect 1s global - lua-load ${testdir}/b00003.lua + lua-load ${testdir}/close_wait_lf.lua frontend frt log ${Slog_addr}:${Slog_port} local0 debug err diff --git a/reg-tests/lua/h_txn_get_priv.vtc b/reg-tests/lua/h_txn_get_priv.vtc index 59774a3342..658a3d6651 100644 --- a/reg-tests/lua/h_txn_get_priv.vtc +++ b/reg-tests/lua/h_txn_get_priv.vtc @@ -5,7 +5,7 @@ feature ignore_unknown_macro haproxy h1 -conf { global - lua-load ${testdir}/h00001.lua + lua-load ${testdir}/h_txn_get_priv.lua frontend fe1 mode http diff --git a/reg-tests/lua/lua_socket.vtc b/reg-tests/lua/lua_socket.vtc index dfb9b3d691..25e238e522 100644 --- a/reg-tests/lua/lua_socket.vtc +++ b/reg-tests/lua/lua_socket.vtc @@ -11,7 +11,7 @@ server s1 { haproxy h1 -conf { global - lua-load ${testdir}/h00002.lua + lua-load ${testdir}/lua_socket.lua frontend fe1 mode http diff --git a/reg-tests/lua/txn_get_priv.vtc b/reg-tests/lua/txn_get_priv.vtc index ecb9955c0b..98f98f7275 100644 --- a/reg-tests/lua/txn_get_priv.vtc +++ b/reg-tests/lua/txn_get_priv.vtc @@ -6,8 +6,8 @@ feature ignore_unknown_macro haproxy h1 -conf { global - lua-load ${testdir}/b00002.lua - lua-load ${testdir}/b00002_print_r.lua + lua-load ${testdir}/txn_get_priv.lua + lua-load ${testdir}/txn_get_priv-print_r.lua frontend fe1 mode http diff --git a/reg-tests/lua/wrong_types_usage.vtc b/reg-tests/lua/wrong_types_usage.vtc index 65d4cbbb8b..321ddf47b6 100644 --- a/reg-tests/lua/wrong_types_usage.vtc +++ b/reg-tests/lua/wrong_types_usage.vtc @@ -43,7 +43,7 @@ server s1 -repeat 2 { haproxy h1 -conf { global - lua-load ${testdir}/b00000.lua + lua-load ${testdir}/wrong_types_usage.lua frontend fe1 mode http diff --git a/reg-tests/mailers/healthcheckmail.vtc b/reg-tests/mailers/healthcheckmail.vtc index ed8c2f15e5..ce3335f9b8 100644 --- a/reg-tests/mailers/healthcheckmail.vtc +++ b/reg-tests/mailers/healthcheckmail.vtc @@ -12,7 +12,7 @@ server s1 { haproxy h1 -conf { global - lua-load ${testdir}/k_healthcheckmail.lua + lua-load ${testdir}/healthcheckmail.lua defaults frontend femail mode tcp