tests

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateProposal    = "createProposal"
	CreatePrepare     = "CreatePrepare"
	CreateCommit      = "CreateCommit"
	CreateRoundChange = "CreateRoundChange"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerSpecTest added in v0.2.2

type ControllerSpecTest struct {
	Name            string
	RunInstanceData []struct {
		InputValue    []byte
		InputMessages []*qbft.SignedMessage
		Decided       bool
		DecidedVal    []byte
		DecidedCnt    uint
		SavedDecided  *qbft.SignedMessage
	}
	ValCheck       qbft.ProposedValueCheckF
	OutputMessages []*qbft.SignedMessage
	ExpectedError  string
}

func (*ControllerSpecTest) Run added in v0.2.2

func (test *ControllerSpecTest) Run(t *testing.T)

func (*ControllerSpecTest) TestName added in v0.2.2

func (test *ControllerSpecTest) TestName() string

type CreateMsgSpecTest

type CreateMsgSpecTest struct {
	Name                                             string
	Value                                            []byte
	Round                                            qbft.Round
	RoundChangeJustifications, PrepareJustifications []*qbft.SignedMessage
	CreateType                                       string
	ExpectedRoot                                     string
	ExpectedError                                    string
}

func (*CreateMsgSpecTest) Run

func (test *CreateMsgSpecTest) Run(t *testing.T)

func (*CreateMsgSpecTest) TestName

func (test *CreateMsgSpecTest) TestName() string

type DecidedMsgSpecTest

type DecidedMsgSpecTest struct {
	Name            string
	Messages        []*qbft.DecidedMessage
	EncodedMessages [][]byte
	ExpectedError   string
}

func (*DecidedMsgSpecTest) Run

func (test *DecidedMsgSpecTest) Run(t *testing.T)

func (*DecidedMsgSpecTest) TestName

func (test *DecidedMsgSpecTest) TestName() string

type MsgProcessingSpecTest

type MsgProcessingSpecTest struct {
	Name           string
	Pre            *qbft.Instance
	PostRoot       string
	InputMessages  []*qbft.SignedMessage
	OutputMessages []*qbft.SignedMessage
	ExpectedError  string
}

func HappyFlow

func HappyFlow() *MsgProcessingSpecTest

HappyFlow tests a simple full happy flow until decided

func SevenOperators

func SevenOperators() *MsgProcessingSpecTest

SevenOperators tests a simple full happy flow until decided

func TenOperators

func TenOperators() *MsgProcessingSpecTest

TenOperators tests a simple full happy flow until decided

func ThirteenOperators

func ThirteenOperators() *MsgProcessingSpecTest

ThirteenOperators tests a simple full happy flow until decided

func (*MsgProcessingSpecTest) Run

func (test *MsgProcessingSpecTest) Run(t *testing.T)

func (*MsgProcessingSpecTest) TestName

func (test *MsgProcessingSpecTest) TestName() string

type MsgSpecTest

type MsgSpecTest struct {
	Name            string
	Messages        []*qbft.SignedMessage
	EncodedMessages [][]byte
	ExpectedRoots   [][]byte
	ExpectedError   string
}

MsgSpecTest tests encoding and decoding of a msg

func (*MsgSpecTest) Run

func (test *MsgSpecTest) Run(t *testing.T)

func (*MsgSpecTest) TestName

func (test *MsgSpecTest) TestName() string

type RoundRobinSpecTest

type RoundRobinSpecTest struct {
	Name      string
	Share     *types.Share
	Heights   []qbft.Height
	Rounds    []qbft.Round
	Proposers []types.OperatorID
}

func (*RoundRobinSpecTest) Run

func (test *RoundRobinSpecTest) Run(t *testing.T)

func (*RoundRobinSpecTest) TestName

func (test *RoundRobinSpecTest) TestName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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