testing

package
v1.1.0-b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Address of a mock StakeWise vault for testing
	StakeWiseVaultString string = "0x57ace215eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type StakeWiseNode added in v1.1.0

type StakeWiseNode struct {
	// contains filtered or unexported fields
}

A complete StakeWise node instance

func (*StakeWiseNode) Close added in v1.1.0

func (n *StakeWiseNode) Close() error

Closes the StakeWise node. The caller is responsible for stopping the Hyperdrive daemon owning this module.

func (*StakeWiseNode) CreateSubNode added in v1.1.0

func (n *StakeWiseNode) CreateSubNode(hdNode *hdtesting.HyperdriveNode, address string, port uint16) (*StakeWiseNode, error)

Create a new StakeWise node based on this one's configuration, but with a custom folder, address, and port.

func (*StakeWiseNode) GetApiClient added in v1.1.0

func (n *StakeWiseNode) GetApiClient() *swclient.ApiClient

Get the HTTP API client for interacting with the node's daemon server

func (*StakeWiseNode) GetHyperdriveNode added in v1.1.0

func (n *StakeWiseNode) GetHyperdriveNode() *hdtesting.HyperdriveNode

Get the Hyperdrive node for this StakeWise module

func (*StakeWiseNode) GetServerManager added in v1.1.0

func (n *StakeWiseNode) GetServerManager() *swserver.ServerManager

Get the HTTP API server for the node's daemon

func (*StakeWiseNode) GetServiceProvider added in v1.1.0

func (n *StakeWiseNode) GetServiceProvider() swcommon.IStakeWiseServiceProvider

Get the daemon's service provider

type StakeWiseTestManager

type StakeWiseTestManager struct {
	*hdtesting.HyperdriveTestManager
	// contains filtered or unexported fields
}

StakeWiseTestManager for managing testing resources and services

func NewStakeWiseTestManager

func NewStakeWiseTestManager() (*StakeWiseTestManager, error)

Creates a new TestManager instance `hdAddress` is the address to bind the Hyperdrive daemon to. `swAddress` is the address to bind the StakeWise daemon to. `nsAddress` is the address to bind the nodeset.io mock server to.

func (*StakeWiseTestManager) Close

func (m *StakeWiseTestManager) Close() error

Closes the test manager, shutting down the nodeset mock server and all other resources

func (*StakeWiseTestManager) GetNode added in v1.1.0

func (m *StakeWiseTestManager) GetNode() *StakeWiseNode

Get the node handle

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL