Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oob_probe
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
oob_probe
Commits
1d24988c
Commit
1d24988c
authored
Oct 24, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tests of interaction with VCL temperature, based on Varnish v00044.vtc
parent
ddf0bae6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
172 additions
and
0 deletions
+172
-0
test09.vtc
src/tests/test09.vtc
+86
-0
test10.vtc
src/tests/test10.vtc
+86
-0
No files found.
src/tests/test09.vtc
0 → 100644
View file @
1d24988c
varnishtest "Interaction of out-of-band probe ports with VCL temperature (cf. v00044.vtc)"
server s1 {} -start
server s2 -repeat 20 {
rxreq
txresp
delay .2
accept
} -start
varnish v1 -arg "-p vcl_cooldown=1" -vcl {
import oob_probe from "${vmod_topbuild}/src/.libs/libvmod_oob_probe.so";
probe p { .interval = 1s; .initial = 1;}
backend default {
.host = "${s1_addr}";
}
sub vcl_init {
oob_probe.port(default, p, "${s2_port}");
}
} -start
# We only have one vcl yet
varnish v1 -expect VBE.vcl1.default.happy >= 0
varnish v1 -expect !VBE.vcl2.default.happy
varnish v1 -cliok "backend.list -p *.*"
varnish v1 -vcl {
import oob_probe from "${vmod_topbuild}/src/.libs/libvmod_oob_probe.so";
probe p { .interval = 1s; .initial = 1;}
backend default {
.host = "${s1_addr}";
}
sub vcl_init {
oob_probe.port(default, p, "${s2_port}");
}
}
# Now we have two vcls (and run on the latest loaded)
delay .4
varnish v1 -expect VBE.vcl1.default.happy >= 0
varnish v1 -expect VBE.vcl2.default.happy >= 0
# Freeze the first VCL
varnish v1 -cliok "vcl.state vcl1 cold"
delay .4
varnish v1 -expect !VBE.vcl1.default.happy
# Set it auto should be a no-op
varnish v1 -cliok "vcl.state vcl1 auto"
delay .4
varnish v1 -expect !VBE.vcl1.default.happy
# Use it, and it should come alive
varnish v1 -cliok "vcl.use vcl1"
delay .4
varnish v1 -expect VBE.vcl1.default.happy >= 0
varnish v1 -expect VBE.vcl2.default.happy >= 0
# and the unused one should go cold
delay 4
varnish v1 -expect !VBE.vcl2.default.happy
# Mark the used warm and use the other
varnish v1 -cliok "vcl.state vcl1 warm"
varnish v1 -cliok "vcl.use vcl2"
# It will stay warm even after the cooldown period
delay 4
varnish v1 -expect VBE.vcl1.default.happy >= 0
varnish v1 -expect VBE.vcl2.default.happy >= 0
# ...when you use a cold VCL
varnish v1 -cliok "vcl.state vcl1 cold"
varnish v1 -cliok "vcl.use vcl1"
# It will apply the cooldown period once inactive
varnish v1 -cliok "vcl.use vcl2"
delay .4
varnish v1 -expect VBE.vcl1.default.happy >= 0
delay 4
varnish v1 -expect !VBE.vcl1.default.happy
src/tests/test10.vtc
0 → 100644
View file @
1d24988c
varnishtest "Interaction of out-of-band probe addresses with VCL temperature (cf. v00044.vtc)"
server s1 {} -start
server s2 -repeat 20 {
rxreq
txresp
delay .2
accept
} -start
varnish v1 -arg "-p vcl_cooldown=1" -vcl {
import oob_probe from "${vmod_topbuild}/src/.libs/libvmod_oob_probe.so";
probe p { .interval = 1s; .initial = 1;}
backend default {
.host = "${s1_addr}";
}
sub vcl_init {
oob_probe.addr(default, p, "${s2_addr}", "${s2_port}");
}
} -start
# We only have one vcl yet
varnish v1 -expect VBE.vcl1.default.happy >= 0
varnish v1 -expect !VBE.vcl2.default.happy
varnish v1 -cliok "backend.list -p *.*"
varnish v1 -vcl {
import oob_probe from "${vmod_topbuild}/src/.libs/libvmod_oob_probe.so";
probe p { .interval = 1s; .initial = 1;}
backend default {
.host = "${s1_addr}";
}
sub vcl_init {
oob_probe.addr(default, p, "${s2_addr}", "${s2_port}");
}
}
# Now we have two vcls (and run on the latest loaded)
delay .4
varnish v1 -expect VBE.vcl1.default.happy >= 0
varnish v1 -expect VBE.vcl2.default.happy >= 0
# Freeze the first VCL
varnish v1 -cliok "vcl.state vcl1 cold"
delay .4
varnish v1 -expect !VBE.vcl1.default.happy
# Set it auto should be a no-op
varnish v1 -cliok "vcl.state vcl1 auto"
delay .4
varnish v1 -expect !VBE.vcl1.default.happy
# Use it, and it should come alive
varnish v1 -cliok "vcl.use vcl1"
delay .4
varnish v1 -expect VBE.vcl1.default.happy >= 0
varnish v1 -expect VBE.vcl2.default.happy >= 0
# and the unused one should go cold
delay 4
varnish v1 -expect !VBE.vcl2.default.happy
# Mark the used warm and use the other
varnish v1 -cliok "vcl.state vcl1 warm"
varnish v1 -cliok "vcl.use vcl2"
# It will stay warm even after the cooldown period
delay 4
varnish v1 -expect VBE.vcl1.default.happy >= 0
varnish v1 -expect VBE.vcl2.default.happy >= 0
# ...when you use a cold VCL
varnish v1 -cliok "vcl.state vcl1 cold"
varnish v1 -cliok "vcl.use vcl1"
# It will apply the cooldown period once inactive
varnish v1 -cliok "vcl.use vcl2"
delay .4
varnish v1 -expect VBE.vcl1.default.happy >= 0
delay 4
varnish v1 -expect !VBE.vcl1.default.happy
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