Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- withMockServer :: HasCallStack => MockServerSettings -> (Chan e -> LiftedApplication) -> ((Host, Port) -> Chan e -> App a) -> App a
- lhMockAppWithPrekeys :: CreateMock App -> Chan (Request, ByteString) -> LiftedApplication
- lhMockApp :: Chan (Request, ByteString) -> LiftedApplication
- mkLegalHoldSettings :: (String, Port) -> Value
- data CreateMock f = MkCreateMock {
- nextLastPrey :: f Value
- somePrekeys :: f [Value]
- type LiftedApplication = Request -> (Response -> App ResponseReceived) -> App ResponseReceived
- data MockServerSettings = MkMockServerSettings {
- certificate :: String
- privateKey :: String
- publicKey :: String
Documentation
:: HasCallStack | |
=> MockServerSettings | the mock server settings |
-> (Chan e -> LiftedApplication) | The certificate and key pair |
-> ((Host, Port) -> Chan e -> App a) | the test |
-> App a |
The channel exists to facilitate out of http comms between the test and the service. Could be used for recording (request, response) pairs.
lhMockAppWithPrekeys :: CreateMock App -> Chan (Request, ByteString) -> LiftedApplication Source #
LegalHold service. Just fake the API, do not maintain any internal state.
lhMockApp :: Chan (Request, ByteString) -> LiftedApplication Source #
data CreateMock f Source #
MkCreateMock | |
|
Instances
App ~ f => Default (CreateMock f) Source # | |
Defined in Testlib.MockIntegrationService def :: CreateMock f Source # |
type LiftedApplication = Request -> (Response -> App ResponseReceived) -> App ResponseReceived Source #
data MockServerSettings Source #
MkMockServerSettings | |
|