Skip to content
Permalink
Browse files

add test case by @rezan

  • Loading branch information...
nigoroll committed Oct 2, 2019
1 parent e2b43f8 commit 0ed38379ae750e02765fd3880741a66d03a06dab
Showing with 33 additions and 0 deletions.
  1. +33 −0 bin/varnishtest/tests/r03009.vtc
@@ -0,0 +1,33 @@
varnishtest "Rollback without restart/retry is unsafe"

server s1 {
rxreq
txresp
} -start

varnish v1 -vcl+backend {
import std;

sub vcl_recv {
set req.http.test = "1";
}

sub vcl_backend_fetch {
unset bereq.http.test;
}

sub vcl_backend_response {
std.rollback(bereq);
set beresp.http.test = bereq.http.test;
set beresp.http.workspace = "start overwriting active workspace";
set beresp.http.workspace = "0123456789012345678901234567890123456789";
# panic...
}
} -start

client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.http.test == "1"
} -run

0 comments on commit 0ed3837

Please sign in to comment.
You can’t perform that action at this time.