mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-04 08:43:40 +02:00
Because of the previous commit, configs making use of lua script without setting "tune.lua.smp-preserve-bool" explicitly now raise a warning. However, since6f746af91("REGTESTS: use -dW by default on every reg-tests"), regtests are not allowed to raise warnings anymore. Because of this the CI now fails for every tests that relies on Lua. To fix this, let's explicitly set the "tune.lua.smp-preserve-bool" for all tests involving Lua. Here we set the value to "on" because we know it is safe to do so, and this way it will be future-proof. Ifec7443827("MINOR: hlua: add option to preserve bool type from smp to lua") is backported, then this patch must be backported with it (if it is not trivial to backport, then simply follow this rule: grep for "lua-load" in reg-tests directory, then for each match, make sure to set the tune.smp-preserve-bool tunable in the global section.
77 lines
1.6 KiB
Plaintext
77 lines
1.6 KiB
Plaintext
varnishtest "Lua: txn:get_priv() scope"
|
|
#REQUIRE_OPTIONS=LUA,OPENSSL
|
|
#REQUIRE_VERSION=2.4
|
|
#REGTEST_TYPE=bug
|
|
|
|
feature ignore_unknown_macro
|
|
|
|
haproxy h1 -conf {
|
|
global
|
|
# WT: limit false-positives causing "HTTP header incomplete" due to
|
|
# idle server connections being randomly used and randomly expiring
|
|
# under us.
|
|
tune.idle-pool.shared off
|
|
|
|
tune.lua.smp-preserve-bool on
|
|
|
|
lua-load-per-thread ${testdir}/txn_get_priv.lua
|
|
lua-load-per-thread ${testdir}/txn_get_priv-print_r.lua
|
|
|
|
defaults
|
|
timeout client 30s
|
|
timeout server 30s
|
|
timeout connect 30s
|
|
|
|
frontend fe1
|
|
mode http
|
|
bind "fd@${fe1}"
|
|
default_backend b1
|
|
|
|
frontend fe2
|
|
mode http
|
|
bind ":8443" ssl crt ${testdir}/common.pem
|
|
stats enable
|
|
stats uri /
|
|
|
|
backend b1
|
|
mode http
|
|
http-request use-service lua.fakeserv
|
|
} -start
|
|
|
|
client c0 -repeat 4 -connect ${h1_fe1_sock} {
|
|
txreq -url "/0"
|
|
rxresp
|
|
expect resp.status == 200
|
|
txreq -url "/0"
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -run
|
|
|
|
client c1 -repeat 4 -connect ${h1_fe1_sock} {
|
|
txreq -url "/1"
|
|
rxresp
|
|
expect resp.status == 200
|
|
txreq -url "/1"
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -run
|
|
|
|
client c2 -repeat 4 -connect ${h1_fe1_sock} {
|
|
txreq -url "/2"
|
|
rxresp
|
|
expect resp.status == 200
|
|
txreq -url "/2"
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -run
|
|
|
|
client c3 -repeat 4 -connect ${h1_fe1_sock} {
|
|
txreq -url "/3"
|
|
rxresp
|
|
expect resp.status == 200
|
|
txreq -url "/3"
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -run
|
|
|