Documentation ¶
Overview ¶
Package testutil provides test utilities.
Index ¶
- func AvailableAddr(t *testing.T) *net.TCPAddr
- func CreateHost(t *testing.T, addr *net.TCPAddr) host.Host
- func RandomAttestation() *eth2p0.Attestation
- func RandomAttestationData() *eth2p0.AttestationData
- func RandomAttestationDuty(t *testing.T) *eth2v1.AttesterDuty
- func RandomBeaconBlock() *eth2p0.BeaconBlock
- func RandomBeaconBlockBody() *eth2p0.BeaconBlockBody
- func RandomBitList() bitfield.Bitlist
- func RandomBytes() []byte
- func RandomCheckpoint() *eth2p0.Checkpoint
- func RandomCommIdx() eth2p0.CommitteeIndex
- func RandomCorePubKey(t *testing.T) core.PubKey
- func RandomCoreSignature() core.Signature
- func RandomEpoch() eth2p0.Epoch
- func RandomEth2PubKey(t *testing.T) eth2p0.BLSPubKey
- func RandomEth2Signature() eth2p0.BLSSignature
- func RandomProposerDuty(t *testing.T) *eth2v1.ProposerDuty
- func RandomRoot() eth2p0.Root
- func RandomSlot() eth2p0.Slot
- func RandomVIdx() eth2p0.ValidatorIndex
- func RequireGoldenBytes(t *testing.T, data []byte)
- func RequireGoldenJSON(t *testing.T, data interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableAddr ¶
AvailableAddr returns an available local tcp address.
func RandomAttestation ¶
func RandomAttestation() *eth2p0.Attestation
func RandomAttestationData ¶
func RandomAttestationData() *eth2p0.AttestationData
func RandomAttestationDuty ¶
func RandomAttestationDuty(t *testing.T) *eth2v1.AttesterDuty
func RandomBeaconBlock ¶
func RandomBeaconBlock() *eth2p0.BeaconBlock
func RandomBeaconBlockBody ¶
func RandomBeaconBlockBody() *eth2p0.BeaconBlockBody
func RandomBitList ¶
func RandomBitList() bitfield.Bitlist
func RandomBytes ¶
func RandomBytes() []byte
func RandomCheckpoint ¶
func RandomCheckpoint() *eth2p0.Checkpoint
func RandomCommIdx ¶
func RandomCommIdx() eth2p0.CommitteeIndex
func RandomCorePubKey ¶
RandomCorePubKey returns a random core workflow pubkey.
func RandomCoreSignature ¶
func RandomEpoch ¶
func RandomEth2PubKey ¶
RandomEth2PubKey returns a random eth2 phase0 bls pubkey.
func RandomEth2Signature ¶
func RandomEth2Signature() eth2p0.BLSSignature
func RandomProposerDuty ¶
func RandomProposerDuty(t *testing.T) *eth2v1.ProposerDuty
func RandomRoot ¶
func RandomSlot ¶
func RandomVIdx ¶
func RandomVIdx() eth2p0.ValidatorIndex
func RequireGoldenBytes ¶
RequireGoldenBytes asserts that a golden testdata file exists containing the exact data. This is heavily inspired from https://github.com/sebdah/goldie.
func RequireGoldenJSON ¶
RequireGoldenJSON asserts that a golden testdata file exists containing the JSON serialised form of the data object. This is heavily inspired from https://github.com/sebdah/goldie.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package beaconmock provides a mock beacon node server and client primarily for testing.
|
Package beaconmock provides a mock beacon node server and client primarily for testing. |
Command genchangelog provides a tool to generate a changelog.md file from a git commit range.
|
Command genchangelog provides a tool to generate a changelog.md file from a git commit range. |
Package keystore provides functions to store and load simnet private keys to/from EIP 2335 compatible keystore files with "simnet" as passwords.
|
Package keystore provides functions to store and load simnet private keys to/from EIP 2335 compatible keystore files with "simnet" as passwords. |
Package validatormock provides mock validator client functionality.
|
Package validatormock provides mock validator client functionality. |
Command verifypr provides a tool to verify charon PRs against the template defined in docs/contibuting.md.
|
Command verifypr provides a tool to verify charon PRs against the template defined in docs/contibuting.md. |
Click to show internal directories.
Click to hide internal directories.