Commit 5cdfb762 authored by Geoff Simmons's avatar Geoff Simmons

Test key not found for a decryption VFP.

parent ed1332ef
......@@ -347,3 +347,39 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 11
server s1 -wait
server s1 -start
# Delete the key, so as to provoke a key not found error.
varnish v1 -vcl+backend {
import ${vmod_ece};
import blob;
sub vcl_init {
ece.delete_key("");
}
sub vcl_backend_response {
set beresp.filters = "ece_decrypt";
set beresp.uncacheable = true;
set beresp.do_stream = false;
}
}
logexpect l1 -v v1 -d 0 -g vxid -q "FetchError" {
expect 0 * Begin bereq
expect * = FetchError {^ece decrypt failure: unknown key $}
expect * = End
} -start
client c1 {
txreq
rxresp
expect resp.status == 503
expect resp.reason == "Backend fetch failed"
} -run
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 12
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