| Copyright | (c) 2023 GYELD GMBH |
|---|---|
| License | Apache 2.0 |
| Maintainer | [email protected] |
| Stability | develop |
| Safe Haskell | None |
| Language | GHC2021 |
GeniusYield.Test.Privnet.Setup
Contents
- Cardano.Testnet re-exports
Description
Synopsis
- data Setup
- withPrivnet :: (CardanoTestnetOptions, GenesisOptions) -> (Setup -> IO ()) -> IO ()
- withSetup :: (String -> IO ()) -> Setup -> (Ctx -> IO ()) -> IO ()
- withSetup' :: GYLogSeverity -> (String -> IO ()) -> Setup -> (Ctx -> IO ()) -> IO ()
- withSetupOld :: Setup -> (String -> IO ()) -> (Ctx -> IO ()) -> IO ()
- mkPrivnetTestFor :: TestName -> Setup -> (TestInfo -> GYTxGameMonadIO ()) -> TestTree
- mkPrivnetTestFor' :: TestName -> GYLogSeverity -> Setup -> (TestInfo -> GYTxGameMonadIO ()) -> TestTree
- cardanoDefaultTestnetOptionsConway :: (CardanoTestnetOptions, GenesisOptions)
- cardanoDefaultTestnetNodeOptions :: TestnetNodeOptions
- data CardanoTestnetOptions = CardanoTestnetOptions {}
- data TestnetNodeOptions
- data NodeLoggingFormat
Documentation
This setup represents a three argument function where first two arguments are for logging & third is for the continuation, in need of Ctx.
Once these arguments are given to this function, it will give Ctx to the continuation, where the logging part (the ctxLog) of Ctx would be obtained from the first two arguments of this function.
The first argument is the log severity filter. Only logs of this severity or higher will be passed on to the second argument, which is a logging action.
withPrivnet :: (CardanoTestnetOptions, GenesisOptions) -> (Setup -> IO ()) -> IO () #
Spawn a resource managed privnet and do things with it (closing it in the end).
Privnet can be configured using Cardano.Testnet.CardanoTestnetOptions. Pass cardanoDefaultTestnetOptionsConway
for default configuration.
Note that passed CardanoTestnetOptions must imply Conway era.
Returns continuation on Setup, which is essentially a function that performs an action
given a logging -- function and the action itself (which receives the Privnet Ctx).
withSetup :: (String -> IO ()) -> Setup -> (Ctx -> IO ()) -> IO () #
Calls the Setup function with a logging function that receives info severity logs, and the action you wish to use with the privnet.
withSetup' :: GYLogSeverity -> (String -> IO ()) -> Setup -> (Ctx -> IO ()) -> IO () #
Calls the Setup function with target logging severity, a logging function and the action you wish to use with the privnet.
mkPrivnetTestFor :: TestName -> Setup -> (TestInfo -> GYTxGameMonadIO ()) -> TestTree #
Given a test name, runs the test under privnet.
mkPrivnetTestFor' :: TestName -> GYLogSeverity -> Setup -> (TestInfo -> GYTxGameMonadIO ()) -> TestTree #
Given a test name, runs the test under privnet with target logging severity.
Cardano.Testnet re-exports
data CardanoTestnetOptions #
Options which, contrary to GenesisOptions are not implemented
by tuning the genesis files.
Constructors
| CardanoTestnetOptions | |
Fields
| |
Instances
| Default CardanoTestnetOptions | |
Defined in Testnet.Start.Types Methods | |
| Show CardanoTestnetOptions | |
Defined in Testnet.Start.Types Methods showsPrec :: Int -> CardanoTestnetOptions -> ShowS # show :: CardanoTestnetOptions -> String # showList :: [CardanoTestnetOptions] -> ShowS # | |
| Eq CardanoTestnetOptions | |
Defined in Testnet.Start.Types Methods (==) :: CardanoTestnetOptions -> CardanoTestnetOptions -> Bool # (/=) :: CardanoTestnetOptions -> CardanoTestnetOptions -> Bool # | |
data TestnetNodeOptions #
Constructors
| UserProvidedNodeOptions FilePath | Value used when the user specifies the node configuration file. We start one single SPO node. |
| AutomaticNodeOptions [AutomaticNodeOption] | Value used when |
Instances
| Show TestnetNodeOptions | |
Defined in Testnet.Start.Types Methods showsPrec :: Int -> TestnetNodeOptions -> ShowS # show :: TestnetNodeOptions -> String # showList :: [TestnetNodeOptions] -> ShowS # | |
| Eq TestnetNodeOptions | |
Defined in Testnet.Start.Types Methods (==) :: TestnetNodeOptions -> TestnetNodeOptions -> Bool # (/=) :: TestnetNodeOptions -> TestnetNodeOptions -> Bool # | |
data NodeLoggingFormat #
Constructors
| NodeLoggingFormatAsJson | |
| NodeLoggingFormatAsText |
Instances
| Show NodeLoggingFormat | |
Defined in Testnet.Start.Types Methods showsPrec :: Int -> NodeLoggingFormat -> ShowS # show :: NodeLoggingFormat -> String # showList :: [NodeLoggingFormat] -> ShowS # | |
| Eq NodeLoggingFormat | |
Defined in Testnet.Start.Types Methods (==) :: NodeLoggingFormat -> NodeLoggingFormat -> Bool # (/=) :: NodeLoggingFormat -> NodeLoggingFormat -> Bool # | |