testutil

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testutil provides helper methods that are useful for implementing tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAddReplica

func ConfigAddReplica(t *testing.T, cfg *mocks.MockConfig, replica *mocks.MockReplica)

ConfigAddReplica adds a mock replica to a mock configuration.

func CreateMockConfig

func CreateMockConfig(t *testing.T, ctrl *gomock.Controller, id hotstuff.ID, key hotstuff.PrivateKey) *mocks.MockConfig

CreateMockConfig returns a mock of a hotstuff.Config.

func CreateMockReplica

func CreateMockReplica(t *testing.T, ctrl *gomock.Controller, id hotstuff.ID, key hotstuff.PublicKey) *mocks.MockReplica

CreateMockReplica returns a mock of a hotstuff.Replica.

func CreateTCPListener

func CreateTCPListener(t *testing.T) net.Listener

CreateTCPListener creates a net.Listener on a random port.

Types

This section is empty.

Jump to

Keyboard shortcuts

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