blob: 658a3d665136b08221245c640c23ccd55dae6e48 [file] [log] [blame]
Patrick Hemmere3faf022018-08-22 10:02:00 -04001varnishtest "Lua: txn:get_priv() scope"
Christopher Fauletfdafd9a2018-12-19 11:50:17 +01002#REQUIRE_OPTIONS=LUA
3
Patrick Hemmere3faf022018-08-22 10:02:00 -04004feature ignore_unknown_macro
5
6haproxy h1 -conf {
7 global
Frédéric Lécailleb894f922019-03-29 16:13:48 +01008 lua-load ${testdir}/h_txn_get_priv.lua
Patrick Hemmere3faf022018-08-22 10:02:00 -04009
10 frontend fe1
11 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010012 ${no-htx} option http-use-htx
Patrick Hemmere3faf022018-08-22 10:02:00 -040013 bind "fd@${fe1}"
14 default_backend b1
15
16 http-response lua.bug
17
18 backend b1
19 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010020 ${no-htx} option http-use-htx
Patrick Hemmere3faf022018-08-22 10:02:00 -040021 http-request use-service lua.fakeserv
22} -start
23
24client c0 -connect ${h1_fe1_sock} {
25 txreq -url "/"
26 rxresp
27 expect resp.status == 201
28 txreq -url "/"
29 rxresp
30 expect resp.status == 201
31}
32
33client c0 -start
34
35client c0 -wait