Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-selector
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-selector
Commits
81cc0105
Commit
81cc0105
authored
Jul 07, 2018
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify VCL failure when .create_stats() is called outside of vcl_init.
parent
399f7206
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
stats.vtc
src/tests/stats.vtc
+32
-0
No files found.
src/tests/stats.vtc
View file @
81cc0105
...
...
@@ -197,3 +197,35 @@ varnish v1 -vsc SELECTOR.vc1.*
# The same for vcl2 after discard.
varnish v1 -cli "vcl.discard vcl2"
varnish v1 -vsc SELECTOR.vc2.*
varnish v1 -vcl {
import ${vmod_selector};
backend b { .host = "${bad_ip}"; }
sub vcl_init {
# No .create_stats() call.
new n = selector.set();
n.add("foo");
n.add("bar");
n.add("baz");
n.add("quux");
}
sub vcl_recv {
n.create_stats();
return(synth(200));
}
}
client c1 {
txreq
rxresp
expect resp.status == 503
expect resp.reason == "VCL failed"
} -run
logexpect l1 -v v1 -d 1 -g vxid -q "VCL_Error" {
expect 0 * Begin req
expect * = VCL_Error {^vmod selector failure: n\.add\(\) may only be called in vcl_init$}
expect * = End
} -run
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