Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestRuntime ¶
TestRuntime is a Runtime implementation meant for use in unit tests. Note that it should always be constructed via NewRuntime.
func NewRuntime ¶ added in v0.5.0
func NewRuntime(tb testing.TB, secrets Secrets) *TestRuntime
NewRuntime creates a new TestRuntime for use in tests. A nil Secrets map is treated as an empty map, but entries cannot be added later. The secrets map is used directly by the TestRuntime; changes to entries will be reflected in subsequent calls to GetSecret.
func (*TestRuntime) GetLogs ¶
func (t *TestRuntime) GetLogs() [][]byte
GetLogs returns a copy of all logs written to the TestRuntime's logger.
func (*TestRuntime) SetNodeRandomSource ¶
func (t *TestRuntime) SetNodeRandomSource(source rand.Source)
SetNodeRandomSource sets the random source used by the Node mode. Note that once the first random is called, changes will have no effect.
func (*TestRuntime) SetRandomSource ¶
func (t *TestRuntime) SetRandomSource(source rand.Source)
SetRandomSource sets the random source used by the DON mode. Note that once the first random is called, changes will have no effect.