[master] 035d982b0 Use a logexpect to check for the substance of c00036.vtc

Nils Goroll nils.goroll at uplex.de
Mon Oct 21 12:57:06 UTC 2019


commit 035d982b0a98611f70a68bd3536d68da22a1ae57
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Oct 21 14:55:45 2019 +0200

    Use a logexpect to check for the substance of c00036.vtc
    
    brought up on IRC by @scn

diff --git a/bin/varnishtest/tests/c00036.vtc b/bin/varnishtest/tests/c00036.vtc
index 4e26467c7..df0574138 100644
--- a/bin/varnishtest/tests/c00036.vtc
+++ b/bin/varnishtest/tests/c00036.vtc
@@ -18,6 +18,25 @@ varnish v1 -vcl+backend {
 	}
 } -start
 
+logexpect l1 -v v1 -q "vxid == 1004" {
+	expect * 1004 VCL_return      {^fetch}
+	expect 0 1004 BackendOpen     {^\d+ s1}
+	expect 0 1004 Timestamp       {^Bereq:}
+
+	# purpose of this vtc: test the internal retry when the
+	# backend goes away on a keepalive TCP connection:
+	expect 0 1004 FetchError      {^HTC eof .-1.}
+	expect 0 1004 BackendClose    {^\d+ s1}
+	expect 0 1004 BackendOpen     {^\d+ s1}
+
+	expect 0 1004 Timestamp       {^Bereq:}
+	expect 0 1004 Timestamp       {^Beresp:}
+	expect 0 1004 BerespProtocol  {^HTTP/1.1}
+	expect 0 1004 BerespStatus    {^200}
+	expect 0 1004 BerespReason    {^OK}
+	expect 0 1004 BerespHeader    {^Content-Length: 6}
+} -start
+
 client c1 {
 	txreq
 	rxresp
@@ -31,3 +50,4 @@ client c1 {
 } -run
 
 varnish v1 -expect backend_retry == 1
+logexpect l1 -wait


More information about the varnish-commit mailing list