mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
Update gitmon fail status spec
This commit is contained in:
parent
c4dd79717f
commit
6dc35dc455
@ -92,7 +92,7 @@ reportGitmon' SocketFactory{..} program gitCommand = do
|
|||||||
_ -> gitCommand
|
_ -> gitCommand
|
||||||
|
|
||||||
throwGitmonException :: ByteString -> e
|
throwGitmonException :: ByteString -> e
|
||||||
throwGitmonException command = throw . GitmonException . unpack $ "Received from Gitmon: '" <> decodeUtf8 command <> "' from Gitmon"
|
throwGitmonException command = throw . GitmonException . unpack $ "Received: '" <> decodeUtf8 command <> "' from Gitmon"
|
||||||
|
|
||||||
collectStats :: IO (TimeSpec, ProcInfo)
|
collectStats :: IO (TimeSpec, ProcInfo)
|
||||||
collectStats = do
|
collectStats = do
|
||||||
|
@ -79,7 +79,10 @@ spec = parallel $ do
|
|||||||
liftIO $ sendAll server "fail too busy"
|
liftIO $ sendAll server "fail too busy"
|
||||||
object <- parseObjOid (pack "dfac8fd681b0749af137aebf3203e77a06fbafc2")
|
object <- parseObjOid (pack "dfac8fd681b0749af137aebf3203e77a06fbafc2")
|
||||||
|
|
||||||
liftIO $ shouldThrow (runReaderT (reportGitmon' socketFactory "cat-file" (lookupCommit object)) repo) anyErrorCall
|
liftIO $ shouldThrow (runReaderT (reportGitmon' socketFactory "cat-file" (lookupCommit object)) repo) gitmonException
|
||||||
|
|
||||||
|
gitmonException :: GitmonException -> Bool
|
||||||
|
gitmonException = const True
|
||||||
|
|
||||||
withSocketPair :: ((Socket, Socket, SocketFactory) -> IO c) -> IO c
|
withSocketPair :: ((Socket, Socket, SocketFactory) -> IO c) -> IO c
|
||||||
withSocketPair = bracket create release
|
withSocketPair = bracket create release
|
||||||
|
Loading…
Reference in New Issue
Block a user