Ema has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/341502 )
Change subject: cache_text varnishtest: vary cookie
......................................................................
cache_text varnishtest: vary cookie
Add 11-vary-cookie.vtc to test 'Vary: Cookie' handling.
Bug: T155314
Change-Id: I83f1ed9e1a406b973fa271c35b7e1f3dd84dc01e
---
A modules/varnish/files/tests/text/11-vary-cookie.vtc
1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/02/341502/1
diff --git a/modules/varnish/files/tests/text/11-vary-cookie.vtc
b/modules/varnish/files/tests/text/11-vary-cookie.vtc
new file mode 100644
index 0000000..456d171
--- /dev/null
+++ b/modules/varnish/files/tests/text/11-vary-cookie.vtc
@@ -0,0 +1,33 @@
+varnishtest "cache_text Vary: Cookie"
+
+server s1 {
+ # Response without "Vary: Cookie"
+ rxreq
+ expect req.url == "/no-vary-cookie"
+ txresp
+
+ # Response *with* "Vary: Cookie"
+ rxreq
+ expect req.url == "/vary-cookie"
+ txresp -hdr "Vary: Cookie"
+} -start
+
+varnish v1 -arg "-p cc_command='exec cc -fpic -shared -Wl,-x -L/usr/local/lib/
-o %o %s -lmaxminddb' -p vcc_allow_inline_c=true -p vcc_err_unref=false"
-vcl+backend {
+ backend vtc_backend {
+ .host = "${s1_addr}"; .port = "${s1_port}";
+ }
+
+ include "/usr/share/varnish/tests/wikimedia_text-frontend.vcl";
+} -start
+
+client c1 {
+ txreq -url "/no-vary-cookie" -hdr "Cookie: enwikiSession=42;" -hdr
"X-Forwarded-Proto: https"
+ rxresp
+ expect resp.status == 200
+ expect resp.http.X-Cache ~ "miss"
+
+ txreq -url "/vary-cookie" -hdr "Cookie: enwikiSession=42;" -hdr
"X-Forwarded-Proto: https"
+ rxresp
+ expect resp.status == 200
+ expect resp.http.X-Cache ~ "pass"
+} -run
--
To view, visit https://gerrit.wikimedia.org/r/341502
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I83f1ed9e1a406b973fa271c35b7e1f3dd84dc01e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits