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.
This commit is contained in:
parent
d7a8f14145
commit
b894f9230c
@ -10,7 +10,7 @@ feature ignore_unknown_macro
|
|||||||
haproxy h1 -conf {
|
haproxy h1 -conf {
|
||||||
global
|
global
|
||||||
# log stdout format short daemon
|
# log stdout format short daemon
|
||||||
lua-load ${testdir}/s00000.lua
|
lua-load ${testdir}/lua_validation.lua
|
||||||
|
|
||||||
defaults
|
defaults
|
||||||
mode http
|
mode http
|
||||||
|
@ -173,7 +173,7 @@ haproxy h2 -conf {
|
|||||||
http-request set-header Okwordtest %[var(sess.okword)] #OK
|
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-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 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 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 Wordtest3 %[var(sess.fieldconcat),word(3,_,2)] #f3__f5
|
||||||
http-request set-header Wordtest4 %[hdr(Fieldconcat2),word(-2,_,3)] #f1_f2_f3
|
http-request set-header Wordtest4 %[hdr(Fieldconcat2),word(-2,_,3)] #f1_f2_f3
|
||||||
|
@ -46,19 +46,19 @@ haproxy h1 -conf {
|
|||||||
bind "fd@${fe1}"
|
bind "fd@${fe1}"
|
||||||
|
|
||||||
# redirect Host: example.org / subdomain.example.org
|
# 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
|
# 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 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 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 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
|
default_backend be1
|
||||||
|
|
||||||
@ -146,29 +146,29 @@ client c7 -connect ${h1_fe1_sock} {
|
|||||||
|
|
||||||
# cli show maps
|
# cli show maps
|
||||||
haproxy h1 -cli {
|
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$"
|
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$"
|
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 {
|
haproxy h1 -cli {
|
||||||
# clear map ${testdir}/h00003.map
|
# clear map ${testdir}/map_redirect.map
|
||||||
send "clear map ${testdir}/h00003.map"
|
send "clear map ${testdir}/map_redirect.map"
|
||||||
expect ~ "^\\n"
|
expect ~ "^\\n"
|
||||||
|
|
||||||
send "show map ${testdir}/h00003.map"
|
send "show map ${testdir}/map_redirect.map"
|
||||||
expect ~ "^\\n"
|
expect ~ "^\\n"
|
||||||
|
|
||||||
# del map ${testdir}/h00003-be.map test1.example.{com,invalid}
|
# del map ${testdir}/map_redirect-be.map test1.example.{com,invalid}
|
||||||
send "del map ${testdir}/h00003-be.map test1.example.com"
|
send "del map ${testdir}/map_redirect-be.map test1.example.com"
|
||||||
expect ~ "^\\n"
|
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"
|
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$"
|
expect ~ "^0x[a-f0-9]+ test2\\.example\\.com test2_be\\n$"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ haproxy h1 -conf {
|
|||||||
# Store host header in variable
|
# Store host header in variable
|
||||||
http-request set-var(txn.host) req.hdr(Host)
|
http-request set-var(txn.host) req.hdr(Host)
|
||||||
# This works correctly
|
# 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
|
# 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
|
default_backend be1
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ syslog Slog {
|
|||||||
|
|
||||||
haproxy h1 -conf {
|
haproxy h1 -conf {
|
||||||
global
|
global
|
||||||
lua-load ${testdir}/b00001.lua
|
lua-load ${testdir}/bad_http_clt_req_duration.lua
|
||||||
|
|
||||||
defaults
|
defaults
|
||||||
timeout client 1s
|
timeout client 1s
|
||||||
|
@ -30,7 +30,7 @@ haproxy h1 -conf {
|
|||||||
timeout connect 1s
|
timeout connect 1s
|
||||||
|
|
||||||
global
|
global
|
||||||
lua-load ${testdir}/b00003.lua
|
lua-load ${testdir}/close_wait_lf.lua
|
||||||
|
|
||||||
frontend frt
|
frontend frt
|
||||||
log ${Slog_addr}:${Slog_port} local0 debug err
|
log ${Slog_addr}:${Slog_port} local0 debug err
|
||||||
|
@ -5,7 +5,7 @@ feature ignore_unknown_macro
|
|||||||
|
|
||||||
haproxy h1 -conf {
|
haproxy h1 -conf {
|
||||||
global
|
global
|
||||||
lua-load ${testdir}/h00001.lua
|
lua-load ${testdir}/h_txn_get_priv.lua
|
||||||
|
|
||||||
frontend fe1
|
frontend fe1
|
||||||
mode http
|
mode http
|
||||||
|
@ -11,7 +11,7 @@ server s1 {
|
|||||||
|
|
||||||
haproxy h1 -conf {
|
haproxy h1 -conf {
|
||||||
global
|
global
|
||||||
lua-load ${testdir}/h00002.lua
|
lua-load ${testdir}/lua_socket.lua
|
||||||
|
|
||||||
frontend fe1
|
frontend fe1
|
||||||
mode http
|
mode http
|
||||||
|
@ -6,8 +6,8 @@ feature ignore_unknown_macro
|
|||||||
|
|
||||||
haproxy h1 -conf {
|
haproxy h1 -conf {
|
||||||
global
|
global
|
||||||
lua-load ${testdir}/b00002.lua
|
lua-load ${testdir}/txn_get_priv.lua
|
||||||
lua-load ${testdir}/b00002_print_r.lua
|
lua-load ${testdir}/txn_get_priv-print_r.lua
|
||||||
|
|
||||||
frontend fe1
|
frontend fe1
|
||||||
mode http
|
mode http
|
||||||
|
@ -43,7 +43,7 @@ server s1 -repeat 2 {
|
|||||||
|
|
||||||
haproxy h1 -conf {
|
haproxy h1 -conf {
|
||||||
global
|
global
|
||||||
lua-load ${testdir}/b00000.lua
|
lua-load ${testdir}/wrong_types_usage.lua
|
||||||
|
|
||||||
frontend fe1
|
frontend fe1
|
||||||
mode http
|
mode http
|
||||||
|
@ -12,7 +12,7 @@ server s1 {
|
|||||||
|
|
||||||
haproxy h1 -conf {
|
haproxy h1 -conf {
|
||||||
global
|
global
|
||||||
lua-load ${testdir}/k_healthcheckmail.lua
|
lua-load ${testdir}/healthcheckmail.lua
|
||||||
defaults
|
defaults
|
||||||
frontend femail
|
frontend femail
|
||||||
mode tcp
|
mode tcp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user