blob: 71e7bb50303b171a45af34bff3bbee6f482a6086 [file] [log] [blame]
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +02001varnishtest "Lua: txn:get_priv() scope"
Tim Duesterhusde5021a2020-05-19 13:49:37 +02002#REQUIRE_OPTIONS=LUA,OPENSSL
Frédéric Lécailledc1a3bd2019-03-29 15:07:24 +01003#REGTEST_TYPE=bug
Christopher Fauletfdafd9a2018-12-19 11:50:17 +01004
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +02005feature ignore_unknown_macro
6
7haproxy h1 -conf {
8 global
Frédéric Lécailleb894f922019-03-29 16:13:48 +01009 lua-load ${testdir}/txn_get_priv.lua
10 lua-load ${testdir}/txn_get_priv-print_r.lua
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +020011
12 frontend fe1
13 mode http
14 bind "fd@${fe1}"
15 default_backend b1
16
17 frontend fe2
18 mode http
19 bind ":8443" ssl crt ${testdir}/common.pem
20 stats enable
21 stats uri /
22
23 backend b1
24 mode http
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +020025 http-request use-service lua.fakeserv
26} -start
27
28client c0 -connect ${h1_fe1_sock} {
29 txreq -url "/"
30 rxresp
31 expect resp.status == 200
32 txreq -url "/"
33 rxresp
34 expect resp.status == 200
35} -run