shared_test

package
v0.0.0-...-5f8afbd Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustExist

func MustExist(exists bool, err error) error

func RunAll

func RunAll(t *testing.T, testsDir string, name string, caseFn func(ctx context.Context, input *Input, cli eth2api.Client) error)

Types

type Input

type Input struct {
	ValueStateId      *string  `json:"state_id,omitempty"`
	ValueBlockId      *string  `json:"block_id,omitempty"`
	ValueValidatorId  *string  `json:"validator_id,omitempty"`
	ValueValidatorIds []string `json:"val_ids,omitempty"`

	Slot           *common.Slot              `json:"slot,omitempty"`
	Root           *common.Root              `json:"root,omitempty"`
	Epoch          *common.Epoch             `json:"epoch,omitempty"`
	CommitteeIndex *common.CommitteeIndex    `json:"committee_index,omitempty"`
	ParentRoot     *common.Root              `json:"parent_root,omitempty"`
	Block          *phase0.SignedBeaconBlock `json:"block,omitempty"`
	StatusFilter   []eth2api.ValidatorStatus `json:"validator_statuses,omitempty"`
}

All possible API method inputs (params and post-body inputs). All of these are optional (not all methods use all inputs). A test method can then selectively use them as inputs, they still may be nil if they are supposed to be omitted as an optional test-input parameter.

func (*Input) BlockId

func (input *Input) BlockId() eth2api.BlockId

func (*Input) StateId

func (input *Input) StateId() eth2api.StateId

func (*Input) ValidatorId

func (input *Input) ValidatorId() eth2api.ValidatorId

func (*Input) ValidatorIds

func (input *Input) ValidatorIds() []eth2api.ValidatorId

Jump to

Keyboard shortcuts

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