This file contains hidden or 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
test "Test restarts in vcl_hit" | |
server s { | |
rxreq | |
expect req.url == "/foo" | |
txresp -status 200 | |
} -start | |
varnish v -vcl+backend { | |
sub vcl_hit { |
This file contains hidden or 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
test "Test restarts in vcl_hit" | |
server s { | |
rxreq | |
expect req.url == "/foo" | |
txresp -status 200 | |
rxreq | |
expect req.url == "/foo" | |
txresp -status 200 | |
} -start |
This file contains hidden or 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
9 RxRequest c GET | |
9 RxURL c /statuses/user_timeline.xml | |
9 RxProtocol c HTTP/1.1 | |
9 RxHeader c Authorization: Basic amFjazoxMjM0 | |
9 RxHeader c User-Agent: curl/7.18.1 (i386-apple-darwin9.2.2) libcurl/7.18.1 zlib/1.2.3 | |
9 RxHeader c Host: localhost | |
9 RxHeader c Accept: */* | |
9 VCL_call c recv | |
9 VCL_return c lookup | |
9 VCL_call c hash |
This file contains hidden or 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
C{ | |
#include <dlfcn.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <assert.h> | |
typedef int twitter_is_fresh_t(char *, char *); | |
static twitter_is_fresh_t *twitter_is_fresh_ptr = NULL; |
This file contains hidden or 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
test "Authorization tokens are cached" | |
server s { | |
rxreq | |
expect req.url == "/" | |
expect req.http.Authorization == "foo" | |
txresp -status 200 | |
} -start | |
varnish v -vcl+backend { |
This file contains hidden or 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
test "Authorization tokens are cached" | |
server s { | |
rxreq | |
expect req.url == "/" | |
expect req.http.Authorization == "Basic foo" | |
txresp -status 200 | |
rxreq | |
expect req.url == "/" |
This file contains hidden or 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
[pivotal@Toemang vcl (master)]$ varnishtest get_is_cached.vtc | |
# top TEST get_is_cached.vtc starting | |
# TEST GET is cached | |
## s Starting server | |
### s listen on 127.0.0.1:9080 (fd 3) | |
## v Launch | |
### v CMD: cd ../varnishd && ./varnishd -d -d -n /tmp/__v -a '127.0.0.1:9081' -T 127.0.0.1:9001 -P /tmp/__v/varnishd.pid | |
### v opening CLI connection | |
## s Started on 127.0.0.1:9080 | |
connect(): Connection refused |
This file contains hidden or 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
test "Stale objects are expired, but served from cache for a grace period" | |
shell "/Users/pivotal/workspace/freshyfresh/bin/memset version:test 2" | |
server s { | |
rxreq | |
expect req.url == "/" | |
txresp -status 200 -hdr "ETag: 1" -hdr "X-Generation-Key: version:test" | |
} -start | |
This file contains hidden or 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
test "Stale objects are expired, but served from cache for a grace period" | |
shell "/Users/pivotal/workspace/freshyfresh/target/memset version:test 2" | |
server s { | |
rxreq | |
expect req.url == "/" | |
txresp -status 200 -hdr "ETag: 1" -hdr "X-Generation-Key: version:test" | |
} -start | |
This file contains hidden or 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
test "Stale objects are expired, but served from cache for a grace period" | |
shell "/Users/pivotal/workspace/freshyfresh/target/memset version:test 2" | |
server s { | |
rxreq | |
expect req.url == "/" | |
txresp -status 200 -hdr "ETag: 1" -hdr "X-Generation-Key: version:test" | |
} -start | |