File: httpclient_action.vtc

package info (click to toggle)
haproxy 3.2.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,880 kB
  • sloc: ansic: 267,692; sh: 3,277; xml: 1,756; python: 1,345; makefile: 1,155; perl: 168; cpp: 21
file content (40 lines) | stat: -rw-r--r-- 949 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
varnishtest "Lua: test the httpclient when the lua action timeout"
#
# Start an httpclient from "lua.test" whose lua task will expire before the
# httpclient is ended.


feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev7)'"
feature ignore_unknown_macro

#REQUIRE_OPTIONS=LUA

haproxy h1 -conf {

    global
        tune.lua.bool-sample-conversion normal
        lua-load ${testdir}/httpclient_action.lua
    defaults
        mode                    tcp
        timeout http-request    10s
        timeout queue           1m
        timeout connect         10s
        timeout client          1m
        timeout server          1m
        timeout check           10s

   listen li1
       mode http
       bind "fd@${fe1}"
       tcp-request inspect-delay 10ms
       tcp-request content lua.test
       http-request return status 503

} -start

client c0 -connect ${h1_fe1_sock} {
    txreq
    rxresp
    expect resp.status == 503
} -run