Documentation ¶
Index ¶
- Constants
- func ApplyMockIO(c *cobra.Command) (BufferReader, BufferWriter)
- func DefaultContext(key sdk.StoreKey, tkey sdk.StoreKey) sdk.Context
- func GetRequestWithHeaders(url string, headers map[string]string) ([]byte, error)
- func TempFile(t testing.TB) *os.File
- func WriteToNewTempFile(t testing.TB, s string) *os.File
- type BufferReader
- type BufferWriter
Constants ¶
View Source
const (
// Tests expect a ledger device initialized to the following mnemonic
TestMnemonic = "equip will roof matter pink blind book anxiety banner elbow sun young"
)
Variables ¶
This section is empty.
Functions ¶
func ApplyMockIO ¶
func ApplyMockIO(c *cobra.Command) (BufferReader, BufferWriter)
ApplyMockIO replaces stdin/out/err with buffers that can be used during testing. Returns an input BufferReader and an output BufferWriter.
func DefaultContext ¶ added in v0.43.0
DefaultContext creates a sdk.Context with a fresh MemDB that can be used in tests.
func GetRequestWithHeaders ¶
GetRequestWithHeaders defines a wrapper around an HTTP GET request with a provided URL and custom headers An error is returned if the request or reading the body fails.
Types ¶
type BufferReader ¶
BufferReader is implemented by types that read from a string buffer.
func ApplyMockIODiscardOutErr ¶
func ApplyMockIODiscardOutErr(c *cobra.Command) BufferReader
ApplyMockIODiscardOutputs replaces a cobra.Command output and error streams with a dummy io.Writer. Replaces and returns the io.Reader associated to the cobra.Command input stream.
Directories ¶
Path | Synopsis |
---|---|
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
|
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators. |
Click to show internal directories.
Click to hide internal directories.