Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-file
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-file
Commits
68568296
Commit
68568296
authored
Sep 21, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the test for timers on warm/cold events.
parent
0e6b7b29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
temperature.vtc
src/tests/temperature.vtc
+71
-0
No files found.
src/tests/temperature.vtc
0 → 100644
View file @
68568296
# looks like -*- vcl -*-
varnishtest "check timers turn on/off as VCL goes warm/cold"
shell {echo -n "foo bar baz quux" > ${tmpdir}/file}
# Debug param vclrel causes VCLs to be released without delay, making
# it possible to check the effects of temperature changes.
varnish v1 -arg "-p debug=+vclrel" -vcl {
import ${vmod_file};
backend b { .host = "${bad_ip}"; }
sub vcl_init {
new rdr1 = file.reader("${tmpdir}/file", ttl=0.1s,
log_checks=true);
new rdr2 = file.reader("${tmpdir}/file", ttl=0.1s,
log_checks=true);
new rdr3 = file.reader("${tmpdir}/file", ttl=0.1s,
log_checks=true);
new rdr4 = file.reader("${tmpdir}/file", ttl=0.1s,
log_checks=true);
new rdr5 = file.reader("${tmpdir}/file", ttl=0.1s,
log_checks=true);
}
} -start
logexpect l1 -v v1 -d 1 -g raw -q "Debug" {
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: updating \S+ at}
expect * * Debug {^vmod file: rdr\d: check for \S+ finished successfully at}
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: updating \S+ at}
expect * * Debug {^vmod file: rdr\d: check for \S+ finished successfully at}
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: updating \S+ at}
expect * * Debug {^vmod file: rdr\d: check for \S+ finished successfully at}
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: updating \S+ at}
expect * * Debug {^vmod file: rdr\d: check for \S+ finished successfully at}
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: updating \S+ at}
expect * * Debug {^vmod file: rdr\d: check for \S+ finished successfully at}
} -run
varnish v1 -vcl { backend b { .host = "${bad_ip}"; } }
varnish v1 -cliok "vcl.state vcl1 cold"
varnish v1 -cliok "vcl.list"
delay .5
# No checks run in the cold state, must be verified manually in the log.
logexpect l1 -v v1 -d 0 -g raw -q "Debug" {
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
expect * * Debug {^vmod file: rdr\d: check for \S+ running at}
} -start
varnish v1 -cliok "vcl.state vcl1 warm"
logexpect l1 -wait
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