This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-server".
The branch, master has been updated
via d05df3f98fc95ee74b04fe48d28e8cd13dce210b (commit)
via 5fc645726120311f24e4656df8a0ec691097507c (commit)
from 981ff2077272d220df194dd76a4bc88906a57248 (commit)
Summary of changes:
test/common/Test/Common/TestHandler.hs | 3 --
test/pongserver/Main.hs | 3 +-
test/snap-server-testsuite.cabal | 2 +-
test/suite/Snap/Internal/Http/Parser/Tests.hs | 21 +++++++-----------
test/suite/Snap/Internal/Http/Server/Tests.hs | 1 -
test/suite/Test/Blackbox.hs | 28 +++++++++++++-----------
6 files changed, 25 insertions(+), 33 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d05df3f98fc95ee74b04fe48d28e8cd13dce210b
Author: Luke Hoersten <[email protected]>
Date: Sun Dec 12 13:20:27 2010 -0600
Fixed test compiler warnings by removing redundant imports, resolving
variable shadowing and commenting code for a pending fix.
diff --git a/test/common/Test/Common/TestHandler.hs
b/test/common/Test/Common/TestHandler.hs
index 885354c..979e81f 100644
--- a/test/common/Test/Common/TestHandler.hs
+++ b/test/common/Test/Common/TestHandler.hs
@@ -14,10 +14,8 @@ import Data.Maybe
import Snap.Iteratee hiding (Enumerator)
import qualified Snap.Iteratee as I
import Snap.Types
-import Snap.Http.Server
import Snap.Util.FileServe
import Snap.Util.GZip
-import Snap.Internal.Iteratee.Debug
import Test.Common.Rot13 (rot13)
@@ -75,4 +73,3 @@ testHandler = withCompression $
, ("bigresponse" , bigResponseHandler )
, ("respcode/:code" , responseHandler )
]
-
diff --git a/test/pongserver/Main.hs b/test/pongserver/Main.hs
index 4299aac..f3044b4 100644
--- a/test/pongserver/Main.hs
+++ b/test/pongserver/Main.hs
@@ -7,7 +7,6 @@ import Control.Exception (finally)
import Snap.Iteratee
import Snap.Types
import Snap.Http.Server
-import Snap.Util.GZip
-- FIXME: need better primitives for output
pongServer :: Snap ()
@@ -29,5 +28,5 @@ main = do
go m = httpServe config pongServer `finally` putMVar m ()
config = addListen (ListenHttp "*" 8000) $
setErrorLog Nothing $
- setAccessLog Nothing $
+ setAccessLog Nothing $
setCompression False $ emptyConfig
diff --git a/test/suite/Snap/Internal/Http/Parser/Tests.hs
b/test/suite/Snap/Internal/Http/Parser/Tests.hs
index ecf7a84..bfc74d6 100644
--- a/test/suite/Snap/Internal/Http/Parser/Tests.hs
+++ b/test/suite/Snap/Internal/Http/Parser/Tests.hs
@@ -8,15 +8,12 @@ module Snap.Internal.Http.Parser.Tests
import qualified Control.Exception as E
import Control.Exception hiding (try, assert)
import Control.Monad
-import Control.Monad.Identity
-import Control.Monad.Trans
import Control.Parallel.Strategies
import Data.Attoparsec hiding (Result(..))
import Data.ByteString (ByteString)
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import Data.ByteString.Internal (c2w)
-import Data.IORef
import Data.List
import qualified Data.Map as Map
import Data.Maybe (isNothing)
@@ -33,7 +30,6 @@ import Text.Printf
import Snap.Internal.Http.Parser
import Snap.Internal.Http.Types
import Snap.Internal.Debug
-import Snap.Internal.Iteratee.Debug
import Snap.Iteratee hiding (map, sequence)
import qualified Snap.Iteratee as I
import Snap.Test.Common()
@@ -125,7 +121,7 @@ testChunked = testProperty "parser/chunkedTransferEncoding"
$
QC.run $ debug $ "chunked is " ++ show chunked
QC.run $ debug "------------------------------"
sstep <- QC.run $ runIteratee $ stream2stream
- step <- QC.run $ runIteratee $
+ step <- QC.run $ runIteratee $
joinI $ readChunkedTransferEncoding sstep
out <- QC.run $ run_ $ enum step
@@ -193,9 +189,9 @@ testBothChunkedPipelined = testProperty
"parser/testBothChunkedPipelined" $
sstep <- QC.run $ runIteratee stream2stream
- let iters = replicate ntimes $ joinI $
- readChunkedTransferEncoding sstep
- let godzilla = sequence $ map (>>= pcrlf) iters
+ let iters' = replicate ntimes $ joinI $
+ readChunkedTransferEncoding sstep
+ let godzilla = sequence $ map (>>= pcrlf) iters'
x <- QC.run $ runIteratee godzilla >>= run_ . e2
@@ -234,9 +230,9 @@ testBothChunkedEmpty = testCase
"parser/testBothChunkedEmpty" prop
let pcrlf = \s -> iterParser $ string "\r\n" >> return s
- let iters = replicate ntimes $ joinI $
- readChunkedTransferEncoding sstep
- godzilla <- runIteratee $ sequence $ map (>>= pcrlf) iters
+ let iters' = replicate ntimes $ joinI $
+ readChunkedTransferEncoding sstep
+ godzilla <- runIteratee $ sequence $ map (>>= pcrlf) iters'
x <- run_ $ e2 godzilla
@@ -271,8 +267,7 @@ testFormEncoded = testCase "parser/formEncoded" $ do
assertEqual "foo3" (Just ["foo bar"] ) $ Map.lookup "foo3" mp
-
-
+copyingStream2Stream :: (Monad m) => Iteratee ByteString m ByteString
copyingStream2Stream = go []
where
go l = do
diff --git a/test/suite/Snap/Internal/Http/Server/Tests.hs
b/test/suite/Snap/Internal/Http/Server/Tests.hs
index c554f56..284cad4 100644
--- a/test/suite/Snap/Internal/Http/Server/Tests.hs
+++ b/test/suite/Snap/Internal/Http/Server/Tests.hs
@@ -30,7 +30,6 @@ import Data.Maybe (fromJust)
import Data.Time.Calendar
import Data.Time.Clock
import Data.Typeable
-import Data.Word
import qualified Network.HTTP.Enumerator as HTTP
import qualified Network.Socket.ByteString as N
import Prelude hiding (catch, take)
diff --git a/test/suite/Test/Blackbox.hs b/test/suite/Test/Blackbox.hs
index cc2debe..03b9302 100644
--- a/test/suite/Test/Blackbox.hs
+++ b/test/suite/Test/Blackbox.hs
@@ -64,7 +64,7 @@ startTestServer :: Int
-> IO (ThreadId, MVar ())
startTestServer port sslport backend = do
let cfg = setAccessLog (Just $ "ts-access." ++ show backend ++ ".log") .
- setErrorLog (Just $ "ts-error." ++ show backend ++ ".log") .
+ setErrorLog (Just $ "ts-error." ++ show backend ++ ".log") .
addListen (ListenHttp "*" port) .
setBackend backend .
setVerbose False $
@@ -97,16 +97,17 @@ doPong ssl port = do
------------------------------------------------------------------------------
-headPong :: Bool -> Int -> IO ByteString
-headPong ssl port = do
- let uri = (if ssl then "https" else "http")
- ++ "://localhost:" ++ show port ++ "/echo"
+-- FIXME: waiting on http-enumerator patch for HEAD behaviour
+-- headPong :: Bool -> Int -> IO ByteString
+-- headPong ssl port = do
+-- let uri = (if ssl then "https" else "http")
+-- ++ "://localhost:" ++ show port ++ "/echo"
- req0 <- HTTP.parseUrl uri
+-- req0 <- HTTP.parseUrl uri
- let req = req0 { HTTP.method = "HEAD" }
- rsp <- HTTP.httpLbs req
- return $ S.concat $ L.toChunks $ HTTP.responseBody rsp
+-- let req = req0 { HTTP.method = "HEAD" }
+-- rsp <- HTTP.httpLbs req
+-- return $ S.concat $ L.toChunks $ HTTP.responseBody rsp
------------------------------------------------------------------------------
testPong :: Bool -> Int -> String -> Test
@@ -116,10 +117,11 @@ testPong ssl port name = testCase (name ++
"/blackbox/pong") $ do
------------------------------------------------------------------------------
-testHeadPong :: Bool -> Int -> String -> Test
-testHeadPong ssl port name = testCase (name ++ "/blackbox/pong/HEAD") $ do
- doc <- headPong ssl port
- assertEqual "pong HEAD response" "" doc
+-- FIXME: waiting on http-enumerator patch for HEAD behaviour
+-- testHeadPong :: Bool -> Int -> String -> Test
+-- testHeadPong ssl port name = testCase (name ++ "/blackbox/pong/HEAD") $ do
+-- doc <- headPong ssl port
+-- assertEqual "pong HEAD response" "" doc
------------------------------------------------------------------------------
commit 5fc645726120311f24e4656df8a0ec691097507c
Author: Luke Hoersten <[email protected]>
Date: Sun Dec 12 13:19:30 2010 -0600
Upped test's http-enumerator dep due to 0.2.1.4 being broken. Thanks to M.
Snoyman for pushing a fix so quickly.
diff --git a/test/snap-server-testsuite.cabal b/test/snap-server-testsuite.cabal
index b939d41..79fa56d 100644
--- a/test/snap-server-testsuite.cabal
+++ b/test/snap-server-testsuite.cabal
@@ -37,7 +37,7 @@ Executable testsuite
enumerator == 0.4.*,
filepath,
haskell98,
- http-enumerator >= 0.2.1.3 && <0.3,
+ http-enumerator >= 0.2.1.5 && <0.3,
HUnit >= 1.2 && < 2,
monads-fd >= 0.1.0.4 && <0.2,
murmur-hash >= 0.1 && < 0.2,
-----------------------------------------------------------------------
hooks/post-receive
--
snap-server
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap