package
1.9.25
Repository: https://github.com/p9c/pod.git
Documentation: pkg.go.dev

# README

rpctest

ISC License GoDoc

Package rpctest provides a pod-specific RPC testing harness crafting and executing integration tests by driving a pod instance via the RPC interface. Each instance of an active harness comes equipped with a simple in-memory HD wallet capable of properly syncing to the generated chain, creating new addresses, and crafting fully signed transactions paying to an arbitrary set of outputs.

This package was designed specifically to act as an RPC testing harness for pod. However, the constructs presented are general enough to be adapted to any project wishing to programmatically drive a pod instance of its systems/integration tests.

Installation and Updating

$ go get -u github.com/p9c/pod/integration/rpctest

License

Package rpctest is licensed under the copyfree ISC License.

# Functions

ActiveHarnesses returns a slice of all currently active test harnesses.
ConnectNode establishes a new peer-to-peer connection between the "from" harness and the "to" harness.
CreateBlock creates a new block building from the previous block with a specified blockversion and timestamp.
JoinNodes is a synchronization tool used to block until all passed nodes are fully synced with respect to an attribute.
New creates and initializes new instance of the rpc test harness.
TearDownAll tears down all active test harnesses.

# Constants

Blocks is a JoinType which waits until all nodes share the same block height.
BlockVersion is the default block version used when generating blocks.
Mempools is a JoinType which blocks until all nodes have identical mempool.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Harness fully encapsulates an active pod process to provide a unified platform for creating rpc driven integration tests involving pod.

# Type aliases

HarnessTestCase represents a test-case which utilizes an instance of the Harness to exercise functionality.
JoinType is an enum representing a particular type of "node join".