Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestFixture ¶
type TestFixture struct { Block *flow.Block ExecutionResult *flow.ExecutionResult ExecutionData *execution_data.BlockExecutionData TxErrorMessages []flow.TransactionResultErrorMessage ExpectedEvents []flow.Event ExpectedResults []flow.LightTransactionResult ExpectedCollections []*flow.Collection ExpectedRegisterEntries flow.RegisterEntries ExpectedScheduledTransactions map[flow.Identifier]uint64 }
TestFixture contains complete random data for testing BlockExecutionData related processing. It also includes expected parsed data for easy assertions.
func CompleteFixture ¶
func CompleteFixture(t *testing.T, g *fixtures.GeneratorSuite, parentHeader *flow.Header) *TestFixture
CompleteFixture generates consistent test fixture data for testing BlockExecutionData related processing. The returned TestFixture includes a flow.Block, flow.ExecutionResult and execution_data.BlockExecutionData, all internally consistent and using consistent randomness.
properties:
- The block execution data contains collections for each of the block's guarantees, plus the system chunk
- Each collection has 3 transactions
- The first path in each trie update is the same, testing that the indexer will use the last value
- Every 3rd transaction is failed
- There are tx error messages for all failed transactions
- There is an execution result for the block, whose ExecutionDataID matches the BlockExecutionData
func (*TestFixture) ExecutionDataEntity ¶
func (tf *TestFixture) ExecutionDataEntity() *execution_data.BlockExecutionDataEntity
Click to show internal directories.
Click to hide internal directories.