This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "Check that Age header can be set to 0s" | |
server s1 { | |
rxreq | |
txresp | |
} -start | |
varnish v2 -vcl+backend { | |
sub vcl_deliver { | |
set resp.http.x-tier-mid = "mid"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "Make sure we play well with other directors" | |
server s1 { | |
rxreq | |
txresp -hdr "server: 1" | |
} -start | |
server s2 { | |
rxreq | |
txresp -hdr "server: 2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "host_header" | |
server s1 -repeat 2 { | |
rxreq | |
expect req.http.host == "overridden" | |
txresp | |
rxreq | |
expect req.http.host == "overridden" | |
txresp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest " test backends timeouts" | |
server s1 { | |
# connect to the backend before connect_timeout | |
rxreq | |
delay 1 | |
# send first byte before first_byte_timeout | |
send "HTTP/1.1 200 OK\r\n" | |
delay 1 | |
# send other bytes before between_bytes_timeout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mse.conf: | |
========= | |
env: { | |
id = "my_mse_id"; | |
memcache_size = "auto"; | |
books = ( { | |
id = "small"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "shard director by req.url (default)" | |
server s1 { | |
rxreq | |
expect req.url == "/s1" | |
expect req.http.Host == "host1" | |
txresp -status 404 -hdr "Server: s1" -body "server1" | |
} -start | |
server s2 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "Conditional Edgestash test" | |
server s1 { | |
rxreq | |
txresp -hdr "Etag: \"100\"" -hdr "bstatus: 200" -hdr "Content-Type: json" -body "Hello, {{first}} {{last}}!" | |
expect req.url == "/page.es" | |
rxreq | |
txresp -hdr "Etag: \"200\"" -body { | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "Goto and fallbacks" | |
server s1 { | |
rxreq | |
txresp -hdr "backend:s1" | |
expect req.url == "/client" | |
rxreq | |
txresp -status 404 -hdr "backend:s1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "Test HTTP vmod CUSTOM request" | |
server s1 { | |
rxreq | |
txresp -status 601 | |
} -start | |
server s2 { | |
rxreq | |
txresp -status 602 -reason "PURGE ok" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "Get YKeys from Origin server" | |
server s1 { | |
rxreq | |
txresp -hdr "ykey: BOB TOM" | |
} -start | |
varnish v1 -vcl+backend { | |
import ykey; |
NewerOlder