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
09650554
Commit
09650554
authored
Feb 27, 2023
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also fix "loopback" ip# in d00007, with a slight cheat.
parent
8a179e22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
30 deletions
+35
-30
d00007.vtc
bin/varnishtest/tests/d00007.vtc
+35
-30
No files found.
bin/varnishtest/tests/d00007.vtc
View file @
09650554
varnishtest "Test dynamic backends"
server s1 {
rxreq
expect req.url == "/"
expect req.http.Probe == "p1"
expect req.http.Authority == <undef>
txresp
close
accept
rxreq
expect req.url == "/1"
expect req.http.Probe == <undef>
expect req.http.Authority == <undef>
txresp
close
accept
rxreq
expect req.url == "/"
expect req.http.Probe == "p2"
expect req.http.Authority == "127.0.0.1"
txresp
close
accept
rxreq
expect req.url == "/2"
expect req.http.Probe == <undef>
expect req.http.Authority == "127.0.0.1"
txresp
} -start
# the use case for via-proxy is to have a(n ha)proxy make a(n ssl)
# connection on our behalf. For the purpose of testing, we use another
# varnish in place - but we are behaving realistically in that we do
...
...
@@ -58,6 +29,40 @@ varnish v2 -proto PROXY -vcl {
}
} -start
# NB: ${v2_addr} in s1's work should really be ${s1_addr}, but it is not
# defined until after the (implicit) listen(2) call, so we cheat
# and use v2's address instead.
server s1 {
rxreq
expect req.url == "/"
expect req.http.Probe == "p1"
expect req.http.Authority == <undef>
txresp
close
accept
rxreq
expect req.url == "/1"
expect req.http.Probe == <undef>
expect req.http.Authority == <undef>
txresp
close
accept
rxreq
expect req.url == "/"
expect req.http.Probe == "p2"
expect req.http.Authority == "${v2_addr}"
txresp
close
accept
rxreq
expect req.url == "/2"
expect req.http.Probe == <undef>
expect req.http.Authority == "${v2_addr}"
txresp
} -start
#
# we vtc.sleep to make sure that the health check is done and server
# s1 has accepted again. We would rather want to use barriers, but
...
...
@@ -122,5 +127,5 @@ client c1 {
txreq -url /2
rxresp
expect resp.status == 200
expect resp.http.Authority == "
127.0.0.1
"
expect resp.http.Authority == "
${s1_addr}
"
} -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