Patrick Hemmer | e3faf02 | 2018-08-22 10:02:00 -0400 | [diff] [blame] | 1 | varnishtest "Lua: txn:get_priv() scope" |
Christopher Faulet | fdafd9a | 2018-12-19 11:50:17 +0100 | [diff] [blame] | 2 | #REQUIRE_OPTIONS=LUA |
| 3 | |
Patrick Hemmer | e3faf02 | 2018-08-22 10:02:00 -0400 | [diff] [blame] | 4 | feature ignore_unknown_macro |
| 5 | |
| 6 | haproxy h1 -conf { |
| 7 | global |
Frédéric Lécaille | b894f92 | 2019-03-29 16:13:48 +0100 | [diff] [blame] | 8 | lua-load ${testdir}/h_txn_get_priv.lua |
Patrick Hemmer | e3faf02 | 2018-08-22 10:02:00 -0400 | [diff] [blame] | 9 | |
| 10 | frontend fe1 |
| 11 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 12 | ${no-htx} option http-use-htx |
Patrick Hemmer | e3faf02 | 2018-08-22 10:02:00 -0400 | [diff] [blame] | 13 | bind "fd@${fe1}" |
| 14 | default_backend b1 |
| 15 | |
| 16 | http-response lua.bug |
| 17 | |
| 18 | backend b1 |
| 19 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 20 | ${no-htx} option http-use-htx |
Patrick Hemmer | e3faf02 | 2018-08-22 10:02:00 -0400 | [diff] [blame] | 21 | http-request use-service lua.fakeserv |
| 22 | } -start |
| 23 | |
| 24 | client 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 | |
| 33 | client c0 -start |
| 34 | |
| 35 | client c0 -wait |