Documentation ¶
Overview ¶
Package testutil provides helper methods that are useful for implementing tests.
Index ¶
- func ConfigAddReplica(t *testing.T, cfg *mocks.MockConfig, replica *mocks.MockReplica)
- func CreateMockConfig(t *testing.T, ctrl *gomock.Controller, id hotstuff.ID, key hotstuff.PrivateKey) *mocks.MockConfig
- func CreateMockReplica(t *testing.T, ctrl *gomock.Controller, id hotstuff.ID, key hotstuff.PublicKey) *mocks.MockReplica
- func CreateTCPListener(t *testing.T) net.Listener
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.