-
Notifications
You must be signed in to change notification settings - Fork 0
/
uap-oss.vtc
60 lines (53 loc) · 2.09 KB
/
uap-oss.vtc
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
varnishtest "oss vcl"
varnish v1 -vcl {
include "${testdir}/uap-oss.vcl";
backend default none;
sub vcl_recv {
return (synth(200));
}
sub vcl_synth {
call uap_detect;
set resp.http.expr = req.http.expr;
set resp.http.ua-family = req.http.ua-family;
set resp.http.ua-major = req.http.ua-major;
set resp.http.ua-minor = req.http.ua-minor;
set resp.http.ua-patch = req.http.ua-patch;
set resp.http.os-family = req.http.os-family;
set resp.http.os-major = req.http.os-major;
set resp.http.os-minor = req.http.os-minor;
set resp.http.os-patch = req.http.os-patch;
set resp.http.os-patch_minor = req.http.os-patch_minor;
set resp.http.device-family = req.http.device-family;
set resp.http.device-brand = req.http.device-brand;
set resp.http.device-model = req.http.device-model;
}
} -start
varnish v1 -cliok "param.set vsl_mask -VCL_use"
varnish v1 -cliok "param.set vsl_mask -Filters"
varnish v1 -cliok "param.set vsl_mask -RespHeader"
varnish v1 -cliok "param.set vsl_mask -VCL_return"
varnish v1 -cliok "param.set vsl_mask -Storage"
varnish v1 -cliok "param.set vsl_mask -Begin"
varnish v1 -cliok "param.set vsl_mask -Timestamp"
varnish v1 -cliok "param.set vsl_mask -ReqAcct"
varnish v1 -cliok "param.set vsl_mask -End"
varnish v1 -cliok "param.set vsl_mask -Link"
varnish v1 -cliok "param.set vsl_mask -ReqStart"
varnish v1 -cliok "param.set vsl_mask -ReqMethod"
varnish v1 -cliok "param.set vsl_mask -ReqURL"
varnish v1 -cliok "param.set vsl_mask -ReqProtocol"
varnish v1 -cliok "param.set vsl_mask -Debug"
varnish v1 -cliok "param.set vsl_mask -ReqHeader"
varnish v1 -cliok "param.set vsl_mask -VCL_call"
varnish v1 -cliok "param.set vsl_mask -RespProtocol"
varnish v1 -cliok "param.set vsl_mask -RespStatus"
varnish v1 -cliok "param.set vsl_mask -Respreason"
shell {
${pwd}/uap2vcl-test --tests ${pwd}/test_ua.yaml --type ua --varnish http://${v1_addr}:${v1_port}/
}
shell {
${pwd}/uap2vcl-test --tests ${pwd}/test_os.yaml --type os --varnish http://${v1_addr}:${v1_port}/
}
shell {
${pwd}/uap2vcl-test --tests ${pwd}/test_device.yaml --type device --varnish http://${v1_addr}:${v1_port}/
}