mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-26 21:19:43 +01:00
Fix warnings
This commit is contained in:
parent
2882a2a8ff
commit
df46b33c6a
1 changed files with 5 additions and 6 deletions
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
module LowLevelTests (lowLevelTests) where
|
module LowLevelTests (lowLevelTests) where
|
||||||
|
|
||||||
import Control.Applicative
|
|
||||||
import Control.Concurrent.Async
|
import Control.Concurrent.Async
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Data.ByteString (ByteString)
|
import Data.ByteString (ByteString)
|
||||||
|
@ -49,7 +48,7 @@ payloadLowLevelServer = TestServer $ \grpc -> do
|
||||||
withServer grpc conf $ \server -> do
|
withServer grpc conf $ \server -> do
|
||||||
let method = head (registeredMethods server)
|
let method = head (registeredMethods server)
|
||||||
result <- serverHandleNormalRegisteredCall server method 11 M.empty $
|
result <- serverHandleNormalRegisteredCall server method 11 M.empty $
|
||||||
\reqBody reqMeta ->
|
\_reqBody _reqMeta ->
|
||||||
return ("reply test", dummyMeta, dummyMeta,
|
return ("reply test", dummyMeta, dummyMeta,
|
||||||
StatusDetails "details string")
|
StatusDetails "details string")
|
||||||
case result of
|
case result of
|
||||||
|
@ -64,7 +63,7 @@ payloadLowLevelClient = TestClient $ \grpc ->
|
||||||
reqResult <- clientRegisteredRequest client method 10 "Hello!" M.empty
|
reqResult <- clientRegisteredRequest client method 10 "Hello!" M.empty
|
||||||
case reqResult of
|
case reqResult of
|
||||||
Left x -> error $ "Client got error: " ++ show x
|
Left x -> error $ "Client got error: " ++ show x
|
||||||
Right (NormalRequestResult respBody initMeta trailingMeta respCode details) -> do
|
Right (NormalRequestResult respBody _initMeta _trailingMeta respCode details) -> do
|
||||||
details @?= "details string"
|
details @?= "details string"
|
||||||
respBody @?= "reply test"
|
respBody @?= "reply test"
|
||||||
respCode @?= GrpcStatusOk
|
respCode @?= GrpcStatusOk
|
||||||
|
@ -76,7 +75,7 @@ payloadLowLevelClientUnregistered = TestClient $ \grpc -> do
|
||||||
case reqResult of
|
case reqResult of
|
||||||
Left x -> error $ "Client got error: " ++ show x
|
Left x -> error $ "Client got error: " ++ show x
|
||||||
Right (NormalRequestResult
|
Right (NormalRequestResult
|
||||||
respBody initMeta trailingMeta respCode details) -> do
|
respBody _initMeta _trailingMeta respCode details) -> do
|
||||||
respBody @?= "reply test"
|
respBody @?= "reply test"
|
||||||
respCode @?= GrpcStatusOk
|
respCode @?= GrpcStatusOk
|
||||||
details @?= "details string"
|
details @?= "details string"
|
||||||
|
@ -85,7 +84,7 @@ payloadLowLevelServerUnregistered :: TestServer
|
||||||
payloadLowLevelServerUnregistered = TestServer $ \grpc -> do
|
payloadLowLevelServerUnregistered = TestServer $ \grpc -> do
|
||||||
withServer grpc (ServerConfig "localhost" 50051 []) $ \server -> do
|
withServer grpc (ServerConfig "localhost" 50051 []) $ \server -> do
|
||||||
result <- serverHandleNormalCall server 11 M.empty $
|
result <- serverHandleNormalCall server 11 M.empty $
|
||||||
\reqBody reqMeta -> return ("reply test", M.empty,
|
\_reqBody _reqMeta -> return ("reply test", M.empty,
|
||||||
StatusDetails "details string")
|
StatusDetails "details string")
|
||||||
case result of
|
case result of
|
||||||
Left x -> error $ show x
|
Left x -> error $ show x
|
||||||
|
|
Loading…
Reference in a new issue