Documentation ¶
Index ¶
- func FirstBlockHash(statusNode *node.StatusNode) (string, error)
- type BackendTestSuite
- func (s *BackendTestSuite) RestartTestNode()
- func (s *BackendTestSuite) SetupTest()
- func (s *BackendTestSuite) StartTestBackend(opts ...TestNodeOption)
- func (s *BackendTestSuite) StopTestBackend()
- func (s *BackendTestSuite) TearDownTest()
- func (s *BackendTestSuite) Transactor() *transactions.Transactor
- func (s *BackendTestSuite) WhisperService() *whisper.Whisper
- type StatusNodeTestSuite
- type TestNodeOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstBlockHash ¶
func FirstBlockHash(statusNode *node.StatusNode) (string, error)
FirstBlockHash validates Attach operation for the StatusNode.
Types ¶
type BackendTestSuite ¶
type BackendTestSuite struct { suite.Suite Backend *api.StatusBackend }
BackendTestSuite is a test suite with api.StatusBackend initialized and a few utility methods to start and stop node or get various services.
func (*BackendTestSuite) RestartTestNode ¶
func (s *BackendTestSuite) RestartTestNode()
RestartTestNode restarts a currently running node.
func (*BackendTestSuite) SetupTest ¶
func (s *BackendTestSuite) SetupTest()
SetupTest initializes Backend.
func (*BackendTestSuite) StartTestBackend ¶
func (s *BackendTestSuite) StartTestBackend(opts ...TestNodeOption)
StartTestBackend imports some keys and starts a node.
func (*BackendTestSuite) StopTestBackend ¶
func (s *BackendTestSuite) StopTestBackend()
StopTestBackend stops the node.
func (*BackendTestSuite) TearDownTest ¶
func (s *BackendTestSuite) TearDownTest()
TearDownTest cleans up the packages state.
func (*BackendTestSuite) Transactor ¶
func (s *BackendTestSuite) Transactor() *transactions.Transactor
Transactor returns a reference to the Transactor.
func (*BackendTestSuite) WhisperService ¶
func (s *BackendTestSuite) WhisperService() *whisper.Whisper
WhisperService returns a reference to the Whisper service.
type StatusNodeTestSuite ¶
type StatusNodeTestSuite struct { suite.Suite StatusNode *node.StatusNode }
StatusNodeTestSuite defines a test suite with StatusNode.
func (*StatusNodeTestSuite) StartTestNode ¶
func (s *StatusNodeTestSuite) StartTestNode(opts ...TestNodeOption)
StartTestNode initiazes a StatusNode instances with configuration retrieved from the test config.
func (*StatusNodeTestSuite) StopTestNode ¶
func (s *StatusNodeTestSuite) StopTestNode()
StopTestNode attempts to stop initialized StatusNode.
type TestNodeOption ¶
type TestNodeOption func(config *params.NodeConfig)
TestNodeOption is a callback passed to StartTestNode which alters its config.
func WithDataDir ¶
func WithDataDir(path string) TestNodeOption
WithDataDir returns TestNodeOption that allows to set another data dir.
func WithUpstream ¶
func WithUpstream(url string) TestNodeOption
WithUpstream returns TestNodeOption which enabled UpstreamConfig.