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
11272422
Commit
11272422
authored
Apr 14, 2014
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test case to make sure we always emit Date headers
parent
0a02a397
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
c00066.vtc
bin/varnishtest/tests/c00066.vtc
+58
-0
No files found.
bin/varnishtest/tests/c00066.vtc
0 → 100644
View file @
11272422
varnishtest "Check that we always deliver Date headers"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
backend bad { .host = "${bad_ip}"; }
sub vcl_recv {
if (req.url == "/synth") {
return (synth(200, "Synth test"));
}
if (req.url == "/error") {
set req.backend_hint = bad;
}
}
sub vcl_backend_response {
set beresp.do_stream = false;
}
} -start
varnish v1 -cliok "param.set connect_timeout 1"
logexpect l1 -v v1 -g request {
expect 0 1001 Begin "^req .* rxreq"
expect * = ReqURL "/"
expect * = RespHeader "^Date: "
expect * = End
expect * 1003 Begin "^req .* rxreq"
expect * = ReqURL "/synth"
expect * = RespHeader "^Date: "
expect * = End
expect * 1004 Begin "^req .* rxreq"
expect * = ReqURL "/error"
expect * = RespHeader "^Date: "
expect * = End
} -start
client c1 {
txreq -url "/"
rxresp
expect resp.status == 200
expect resp.msg == "Ok"
txreq -url "/synth"
rxresp
expect resp.status == 200
expect resp.msg == "Synth test"
txreq -url "/error"
rxresp
expect resp.status == 503
} -run
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