Skip to content

Commit

Permalink
tests: Unset http_proxy environment variable
Browse files Browse the repository at this point in the history
Closes: erikd#8
  • Loading branch information
erikd-ambiata authored and erikd committed Sep 5, 2016
1 parent 22240ed commit b3cdb05
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Test/testsuite.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
------------------------------------------------------------
-- Copyright : Erik de Castro Lopo <[email protected]>
Expand All @@ -12,6 +13,7 @@ import Control.Monad.Trans.Resource
import Data.Conduit
import Data.Int (Int64)
import Data.Monoid
import System.Environment
import Test.Hspec
import Test.Hspec.QuickCheck

Expand All @@ -37,7 +39,12 @@ proxyTestDebug :: Bool
proxyTestDebug = False

main :: IO ()
main =
main = do
#if __GLASGOW_HASKELL__ > 706
-- Clear the `http_proxy` enviroment variable. We can't use `unsetEnv` if
-- we want to support ghc 7.6.
unsetEnv "http_proxy"
#endif
bracket
(mapM async [ runTestServer, runTestServerTLS ])
(mapM_ cancel)
Expand Down

0 comments on commit b3cdb05

Please sign in to comment.