Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-dispatch
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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-dispatch
Commits
8ead94e1
Commit
8ead94e1
authored
Oct 27, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for calling label.add() outside of vcl_init.
parent
1d3ad7af
Pipeline
#356
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
label.vtc
src/tests/label.vtc
+12
-0
No files found.
src/tests/label.vtc
View file @
8ead94e1
...
...
@@ -96,6 +96,9 @@ varnish v1 -vcl {
elsif (req.url == "/outofrange") {
l.go(3);
}
elsif (req.url == "/add") {
l.add(1, "VCL1");
}
}
sub vcl_backend_fetch {
...
...
@@ -127,6 +130,14 @@ client c1 {
expect resp.http.VCL == <undef>
} -run
client c1 {
txreq -url "/add"
rxresp
expect resp.status == 503
expect resp.reason == "VCL failed"
expect resp.http.VCL == <undef>
} -run
client c1 {
txreq
rxresp
...
...
@@ -139,6 +150,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VCL_Error" {
expect * * VCL_Error "^vmod dispatch error: l.go.-1.: n must be >= 0$"
expect * * VCL_Error "^vmod dispatch error: l.go.1.: label 1 was not added$"
expect * * VCL_Error "^vmod dispatch error: l.go.3.: highest label number is 2"
expect * * VCL_Error "^vmod dispatch error: l.add.1, VCL1. may only be called in vcl_init$"
expect * * VCL_Error "^vmod dispatch error: l.go.0.: may only be called in client context, not in any vcl_backend_. subroutine$"
} -start
...
...
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