[master] 908c9b811 vtc: Add BLOB literal coverage for synth bodies

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Feb 7 12:11:06 UTC 2023


commit 908c9b81132a93d3dd8880c10d5541ea009f94c3
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Feb 7 13:05:37 2023 +0100

    vtc: Add BLOB literal coverage for synth bodies

diff --git a/bin/varnishtest/tests/r03079.vtc b/bin/varnishtest/tests/r03079.vtc
index 22da633ac..100df5af6 100644
--- a/bin/varnishtest/tests/r03079.vtc
+++ b/bin/varnishtest/tests/r03079.vtc
@@ -50,7 +50,9 @@ varnish v1 -vcl {
 				set resp.body += "world";
 			}
 		}
-		if (req.url ~ "blob") {
+		if (req.url ~ "blob/literal") {
+			set resp.body = :aGVsbG93b3JsZA==:;
+		} elif (req.url ~ "blob") {
 			set resp.body = blob.decode(HEX, encoded="1100");
 			if (req.url ~ "reset") {
 				set resp.body = blob.decode(HEX, encoded="221100");
@@ -95,4 +97,8 @@ client c2 {
 	txreq -url "/blob/add"
 	rxresp
 	expect resp.bodylen == 5
+
+	txreq -url "/blob/literal"
+	rxresp
+	expect resp.body == helloworld
 } -run


More information about the varnish-commit mailing list