Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-cluster
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-cluster
Commits
f46cbfdc
Commit
f46cbfdc
authored
May 23, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test for resolve=LAZY (default)
parent
a1aa7632
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletion
+49
-1
Makefile.am
src/Makefile.am
+2
-1
lazy.vtc
src/vtc/lazy.vtc
+47
-0
No files found.
src/Makefile.am
View file @
f46cbfdc
...
...
@@ -25,7 +25,8 @@ AM_VTC_LOG_FLAGS = \
-p
vmod_path
=
"
$(abs_builddir)
/.libs:
$(vmoddir)
"
TESTS
=
\
vtc/vmod_cluster.vtc
vtc/vmod_cluster.vtc
\
vtc/lazy.vtc
# Documentation
...
...
src/vtc/lazy.vtc
0 → 100644
View file @
f46cbfdc
varnishtest "vmod_cluster toy example with round-robin - lazy resolution"
server s1 {
rxreq
txresp
} -start
server s2 {
}
server s3 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
import cluster;
import directors;
sub vcl_init {
new rr = directors.round_robin();
rr.add_backend(s1);
rr.add_backend(s2);
new cl = cluster.cluster(rr.backend(), deny=s2, real=s3,
uncacheable_direct=false);
}
sub vcl_recv {
return (pass);
}
sub vcl_backend_fetch {
set bereq.backend = cl.backend();
}
sub vcl_backend_response {
set beresp.http.backend = beresp.backend;
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.http.backend == "s1"
txreq
rxresp
expect resp.status == 200
expect resp.http.backend == "s3"
} -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