Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
afbc4a2a
Commit
afbc4a2a
authored
Nov 07, 2016
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test PRIV_TASK (and std.log) in vcl_fini
parent
0ce5b8b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
v00041.vtc
bin/varnishtest/tests/v00041.vtc
+31
-1
No files found.
bin/varnishtest/tests/v00041.vtc
View file @
afbc4a2a
...
...
@@ -5,9 +5,12 @@ server s1 {
txresp
rxreq
txresp
rxreq
txresp
} -start
varnish v1 -vcl+backend {
varnish v1 -
arg "-p debug=+vclrel" -
vcl+backend {
import debug;
import std;
...
...
@@ -46,6 +49,14 @@ varnish v1 -vcl+backend {
set beresp.http.bx1 = debug.test_priv_task("");
set beresp.http.bo1 = obj.test_priv_task("");
}
sub vcl_fini {
debug.test_priv_task("cleaning");
debug.test_priv_task("up");
std.log("func " + debug.test_priv_task());
std.log("obj " + obj.test_priv_task());
}
} -start
logexpect l1 -v v1 -g raw -d 1 {
...
...
@@ -64,6 +75,10 @@ logexpect l1 -v v1 -g raw -d 1 {
expect 0 = VCL_Log ^foo
expect 0 = BereqHeader {^bx0: b /snafu}
expect 0 = VCL_Log ^bar
expect * 0 Debug {^vcl1: VCL_EVENT_COLD}
expect * = VCL_Log {^func cleaning up}
expect 0 = VCL_Log {^obj cleaning up}
} -start
client c1 {
...
...
@@ -86,4 +101,19 @@ client c1 {
expect resp.http.bo1 == "b /snafu"
} -run
shell "echo 'vcl 4.0; backend foo { .host = \"${s1_addr}\"; .port = \"${s1_port}\"; }' > ${tmpdir}/_b00014.vcl"
varnish v1 -cliok "vcl.load foo ${tmpdir}/_b00014.vcl" \
-cliok "vcl.use foo" \
-cliok "vcl.list" \
-cliok "vcl.discard vcl1" \
-cliok "vcl.list"
client c1 {
txreq -url /foo
rxresp
} -run
varnish v1 -cliok "vcl.list"
logexpect l1 -wait
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment