blob: e1fe7f33558b00465efbdf2fd751544c04e33c6d [file] [log] [blame]
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +02001varnishtest "Lua: txn:get_priv() scope"
Christopher Fauletfdafd9a2018-12-19 11:50:17 +01002#REQUIRE_OPTIONS=LUA
3
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +02004feature ignore_unknown_macro
5
6haproxy h1 -conf {
7 global
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +02008 lua-load ${testdir}/b00002.lua
9 lua-load ${testdir}/b00002_print_r.lua
10
11 frontend fe1
12 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010013 ${no-htx} option http-use-htx
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +020014 bind "fd@${fe1}"
15 default_backend b1
16
17 frontend fe2
18 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010019 ${no-htx} option http-use-htx
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +020020 bind ":8443" ssl crt ${testdir}/common.pem
21 stats enable
22 stats uri /
23
24 backend b1
25 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010026 ${no-htx} option http-use-htx
Frédéric Lécaille54f2bcf2018-08-29 13:46:24 +020027 http-request use-service lua.fakeserv
28} -start
29
30client 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