From 1249157afd7be896bfed78c20c2a842229f6b0cd Mon Sep 17 00:00:00 2001 From: David Cooper Date: Fri, 14 Apr 2017 11:39:28 -0400 Subject: [PATCH] Handle differing HTTP clock skew Occasionally the HTTP clock skew will differ between the two runs of testssl.sh, so remove that text from the strings that are compared. --- t/02_http.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/02_http.t b/t/02_http.t index 1a72d17..1055dfb 100644 --- a/t/02_http.t +++ b/t/02_http.t @@ -41,6 +41,10 @@ $debughtml =~ s/Start 2[0-9][0-9][0-9]-[0-3][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0- $okhtml =~ s/Done 2[0-9][0-9][0-9]-[0-3][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9] \[ [0-9]*s\]//; $debughtml =~ s/Done 2[0-9][0-9][0-9]-[0-3][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9] \[ [0-9]*s\]//; +# Remove time difference from "HTTP clock skew" line +$okhtml =~ s/HTTP clock skew +?-?[0-9]* //; +$debughtml =~ s/HTTP clock skew +?-?[0-9]* //; + pass("Checking that using the --debug option doesn't affect the HTML file"); $tests++; cmp_ok($debughtml, "eq", $okhtml, "HTML file created with --debug 4 matches HTML file created without --debug"); $tests++;