blob: 83e06a63d60bd34a084f4096b57c68554f2d4d69 [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
PiBa-NL05276392018-11-30 21:01:01 +01005
6server s1 {
7 rxreq
8 txresp -bodylen 20
9} -start
10
11haproxy h1 -conf {
12 global
Frédéric Lécailleb894f922019-03-29 16:13:48 +010013 lua-load ${testdir}/lua_socket.lua
PiBa-NL05276392018-11-30 21:01:01 +010014
15 frontend fe1
16 mode http
17 bind "fd@${fe1}"
18 default_backend b1
19
20 backend b1
21 mode http
22 http-request use-service lua.fakeserv
23
24} -start
25
26client c0 -connect ${h1_fe1_sock} {
27 txreq -url "/" -hdr "vtcport: ${s1_port}"
28 rxresp
29 expect resp.status == 200
30} -run
31
32
Willy Tarreau6b6736b2018-12-07 15:25:26 +010033server s1 -wait