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
a72a28a2
Unverified
Commit
a72a28a2
authored
Aug 25, 2021
by
AlveElde
Committed by
Nils Goroll
Nov 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test case for handling initially cold VCLs
parent
dda20238
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
v00067.vtc
bin/varnishtest/tests/v00067.vtc
+41
-0
No files found.
bin/varnishtest/tests/v00067.vtc
0 → 100644
View file @
a72a28a2
varnishtest "The active VCL must always be warm"
shell {
cat >${tmpdir}/f1 <<-EOF
vcl 4.1;
backend default none;
EOF
}
# Load a cold VCL. This should not become the active VCL.
varnish v1 -cliok "vcl.load vcl_cold ${tmpdir}/f1 cold"
varnish v1 -cliexpect "available *cold *cold *- *vcl_cold" "vcl.list"
# The cache should not start without a warm VCL.
varnish v1 -clierr 300 "start"
# Load a warm VCL and make it the active VCL.
varnish v1 -cliok "vcl.load vcl_warm ${tmpdir}/f1 warm"
varnish v1 -cliok "vcl.use vcl_warm"
varnish v1 -cliexpect "active *warm *warm *- *vcl_warm" "vcl.list"
# The cache now starts.
varnish v1 -cliok "start"
varnish v1 -cliexpect "available *cold *cold *0 *vcl_cold" "vcl.list"
varnish v1 -cliexpect "active *warm *warm *0 *vcl_warm" "vcl.list"
# Load an automatically warming VCL, and set it as the active VCL.
varnish v1 -cliok "vcl.load vcl_auto ${tmpdir}/f1 warm"
varnish v1 -cliok "vcl.use vcl_auto"
varnish v1 -cliexpect "available *warm *warm *0 *vcl_warm" "vcl.list"
varnish v1 -cliexpect "active *warm *warm *0 *vcl_auto" "vcl.list"
# Cool the previous active VCL.
varnish v1 -cliok "vcl.state vcl_warm cold"
varnish v1 -cliexpect "available *cold *cold *0 *vcl_warm" "vcl.list"
# Restart the cache.
varnish v1 -cliok "stop" -cliok "start"
varnish v1 -cliexpect "available *cold *cold *0 *vcl_cold" "vcl.list"
varnish v1 -cliexpect "available *cold *cold *0 *vcl_warm" "vcl.list"
varnish v1 -cliexpect "active *warm *warm *0 *vcl_auto" "vcl.list"
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