Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 1 | varnishtest "Lua: txn:get_priv() scope" |
Tim Duesterhus | de5021a | 2020-05-19 13:49:37 +0200 | [diff] [blame] | 2 | #REQUIRE_OPTIONS=LUA,OPENSSL |
Frédéric Lécaille | dc1a3bd | 2019-03-29 15:07:24 +0100 | [diff] [blame] | 3 | #REGTEST_TYPE=bug |
Christopher Faulet | fdafd9a | 2018-12-19 11:50:17 +0100 | [diff] [blame] | 4 | |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 5 | feature ignore_unknown_macro |
| 6 | |
| 7 | haproxy h1 -conf { |
| 8 | global |
Frédéric Lécaille | b894f92 | 2019-03-29 16:13:48 +0100 | [diff] [blame] | 9 | lua-load ${testdir}/txn_get_priv.lua |
| 10 | lua-load ${testdir}/txn_get_priv-print_r.lua |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 11 | |
| 12 | frontend fe1 |
| 13 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 14 | ${no-htx} option http-use-htx |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 15 | bind "fd@${fe1}" |
| 16 | default_backend b1 |
| 17 | |
| 18 | frontend fe2 |
| 19 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 20 | ${no-htx} option http-use-htx |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 21 | bind ":8443" ssl crt ${testdir}/common.pem |
| 22 | stats enable |
| 23 | stats uri / |
| 24 | |
| 25 | backend b1 |
| 26 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 27 | ${no-htx} option http-use-htx |
Frédéric Lécaille | 54f2bcf | 2018-08-29 13:46:24 +0200 | [diff] [blame] | 28 | http-request use-service lua.fakeserv |
| 29 | } -start |
| 30 | |
| 31 | client c0 -connect ${h1_fe1_sock} { |
| 32 | txreq -url "/" |
| 33 | rxresp |
| 34 | expect resp.status == 200 |
| 35 | txreq -url "/" |
| 36 | rxresp |
| 37 | expect resp.status == 200 |
| 38 | } -run |