Created
November 13, 2008 18:03
-
-
Save nkallen/24536 to your computer and use it in GitHub Desktop.
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 { | |
include "/usr/local/etc/varnish/default.vcl"; | |
} -start | |
client c1 { | |
txreq -req GET -url "/" -hdr "Authorization: foo" | |
rxresp | |
expect resp.status == 200 | |
} -run | |
server s { | |
rxreq | |
expect req.url == "/" | |
expect req.http.Authorization == "bar" | |
txresp -status 404 | |
} -start | |
client c2 { | |
txreq -req GET -url "/" -hdr "Authorization: bar" | |
rxresp | |
expect resp.status == 404 | |
} -run | |
client c1 { | |
txreq -req GET -url "/" -hdr "Authorization: foo" | |
rxresp | |
expect resp.status == 200 | |
} -run | |
client c2 { | |
txreq -req GET -url "/" -hdr "Authorization: bar" | |
rxresp | |
expect resp.status == 404 | |
} -run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment