Documentation
¶
Overview ¶
Package sessiontest implements test helpers for functionalities defined in session.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfig ¶
NewConfig generates random configuration data for the session using the given prng and contacts. A contacts file is created with the given set of peers and path to it is added in the config. This function also registers cleanup functions for removing all the temp files and dirs after the test.
This function returns a session config with user on-chain addresses that are funded on blockchain when using a particular seed for prng. The first two consecutive calls to this function will return funded accounts when using prng := rand.New(rand.NewSource(1729)).
func NewConfigFile ¶
NewConfigFile creates a temporary file containing the given session configuration and returns the path to it. It also registers a cleanup function on the passed test handler.
func NewUserConfig ¶
func NewUserConfig(t *testing.T, rng *rand.Rand, n uint) (perun.WalletBackend, session.UserConfig)
NewUserConfig returns a test user configuration with random data generated using the given rng. It creates "n" participant accounts to the user.
Types ¶
This section is empty.