Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [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 | |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 4 | feature ignore_unknown_macro |
| 5 | |
| 6 | haproxy h1 -conf { |
| 7 | global |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 8 | lua-load ${testdir}/b00002.lua |
| 9 | lua-load ${testdir}/b00002_print_r.lua |
| 10 | |
| 11 | frontend fe1 |
| 12 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 13 | ${no-htx} option http-use-htx |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 14 | bind "fd@${fe1}" |
| 15 | default_backend b1 |
| 16 | |
| 17 | frontend fe2 |
| 18 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 19 | ${no-htx} option http-use-htx |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 20 | bind ":8443" ssl crt ${testdir}/common.pem |
| 21 | stats enable |
| 22 | stats uri / |
| 23 | |
| 24 | backend b1 |
| 25 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 26 | ${no-htx} option http-use-htx |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 27 | http-request use-service lua.fakeserv |
| 28 | } -start |
| 29 | |
| 30 | client c0 -connect ${h1_fe1_sock} { |
| 31 | txreq -url "/" |
| 32 | rxresp |
| 33 | expect resp.status == 200 |
| 34 | txreq -url "/" |
| 35 | rxresp |
| 36 | expect resp.status == 200 |
| 37 | } -run |