]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix cookie_file test sporadic fails for time change during
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 10 Oct 2024 07:45:48 +0000 (09:45 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 10 Oct 2024 07:45:48 +0000 (09:45 +0200)
  the test.

doc/Changelog
testdata/cookie_file.tdir/cookie_file.test

index 707d3d6450cba8def8cb7c3325f4a189b5fb70e5..9aa70e15e035f89eae253789944f807266dc6e01 100644 (file)
@@ -1,3 +1,7 @@
+10 October 2024: Wouter
+       - Fix cookie_file test sporadic fails for time change during
+         the test.
+
 9 October 2024: Wouter
        - Merge #871: DNS over QUIC. This adds `quic-port: 853` and
          `quic-size: 8m` that enable dnsoverquic, and the counters
index 7da4fa657bb812f47af219aedf0deca11843c275..d5d2c2d1fab811d0ad0e2a811a1b3e34a32f2ec3 100644 (file)
@@ -238,10 +238,12 @@ then
        echo "Got the same first cookie in the response while the second secret is active"
        exit 1
 fi
-if ! grep -q "COOKIE: $second_cookie" $outfile
+if ! grep -q "COOKIE: .* (good)$" $outfile
 then
+       # dig can generate a different cookie value here than previous cookies.
+       # but make sure the output contains a valid cookie
        cat $outfile
-       echo "Did not get the same second cookie in the response"
+       echo "Did not get a valid cookie in the response"
        exit 1
 fi