blob: c3adc95abc5683cd19a97dfb82be5398bdfb7a0c [file] [log] [blame]
PiBa-NL05276392018-11-30 21:01:01 +01001varnishtest "Lua: check socket functionality from a lua-task"
2feature ignore_unknown_macro
3
4#REQUIRE_OPTIONS=LUA
5#REQUIRE_VERSION=1.6
6
7server s1 {
8 rxreq
9 txresp -bodylen 20
10} -start
11
12haproxy h1 -conf {
13 global
Willy Tarreau6b6736b2018-12-07 15:25:26 +010014 lua-load ${testdir}/h00002.lua
PiBa-NL05276392018-11-30 21:01:01 +010015
16 frontend fe1
17 mode http
18 bind "fd@${fe1}"
19 default_backend b1
20
21 backend b1
22 mode http
23 http-request use-service lua.fakeserv
24
25} -start
26
27client c0 -connect ${h1_fe1_sock} {
28 txreq -url "/" -hdr "vtcport: ${s1_port}"
29 rxresp
30 expect resp.status == 200
31} -run
32
33
Willy Tarreau6b6736b2018-12-07 15:25:26 +010034server s1 -wait