Commit d9e41ce9 authored by Geoff Simmons's avatar Geoff Simmons

a few more tests for identity en-/decode

parent 5b3ab4c1
......@@ -2,10 +2,9 @@
varnishtest "IDENTITY encode and decode"
server s1 {} -start
varnish v1 -vcl+backend {
varnish v1 -vcl {
import convert from "${vmod_topbuild}/src/.libs/libvmod_convert.so";
backend b { .host = "${bad_ip}"; }
sub vcl_recv {
return(synth(200));
......@@ -16,6 +15,10 @@ varnish v1 -vcl+backend {
convert.encode(IDENTITY, convert.decode(IDENTITY,
"The quick brown fox jumps over the lazy dog"));
set resp.http.hobbes =
convert.encode(IDENTITY, convert.decode(IDENTITY,
{"Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure."}));
set resp.http.list =
convert.encode(IDENTITY, convert.decode(IDENTITY,
"" + req.http.unset + req.url +
......@@ -56,6 +59,7 @@ client c1 {
txreq -url "/"
rxresp
expect resp.http.id == "The quick brown fox jumps over the lazy dog"
expect resp.http.hobbes == "Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure."
expect resp.http.list == "/The quick brown fox jumps over the lazy dog/"
expect resp.http.empty == ""
expect resp.http.undef == ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment