1
1
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:
Rick Winfrey 2017-03-08 11:10:57 -08:00
parent c4dd79717f
commit 6dc35dc455
2 changed files with 5 additions and 2 deletions

View File

@ -92,7 +92,7 @@ reportGitmon' SocketFactory{..} program gitCommand = do
_ -> gitCommand
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 = do

View File

@ -79,7 +79,10 @@ spec = parallel $ do
liftIO $ sendAll server "fail too busy"
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 = bracket create release