From 3f7a4013c126215e61eeb34a2372b4bd1ef77c76 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Sat, 26 Sep 2015 09:56:02 +1000 Subject: [PATCH] Tweak expect test result for HTTP to HTTPS upgrade The HTTP upgrade to HTTS test was failing in slightly different ways on two different machines; TlsException and TlsExceptionHostPort. We now accept either. --- Test/testsuite.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Test/testsuite.hs b/Test/testsuite.hs index 07a2b03..03f053b 100644 --- a/Test/testsuite.hs +++ b/Test/testsuite.hs @@ -147,7 +147,7 @@ requestTest = describe "Request:" $ do -- Getting a TlsException shows that we have successfully upgraded -- from HTTP to HTTPS. Its not possible to ignore this failure -- because its made by the http-conduit inside the proxy. - BS.takeWhile (/= ' ') (resultBS result) `shouldBe` "TlsException" + BS.take 12 (resultBS result) `shouldBe` "TlsException" it "Can provide a proxy Response." $ withTestProxy proxySettingsProxyResponse $ \ testProxyPort -> do req <- addTestProxy testProxyPort <$> mkGetRequest Http "/whatever"