{"modulePath":"github.com/onflow/flow-go","version":"v0.51.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package testutil\n\n## Types\n\n```go\ntype TestFixture struct {\n\tBlock           *flow.Block\n\tExecutionResult *flow.ExecutionResult\n\tExecutionData   *execution_data.BlockExecutionData\n\tTxErrorMessages []flow.TransactionResultErrorMessage\n\tGuarantees      []*flow.CollectionGuarantee\n\tIndex           *flow.Index\n\n\tExpectedEvents                []flow.Event\n\tExpectedResults               []flow.LightTransactionResult\n\tExpectedCollections           []*flow.Collection\n\tExpectedRegisterEntries       flow.RegisterEntries\n\tExpectedScheduledTransactions map[flow.Identifier]uint64\n}\n```\nTestFixture contains complete random data for testing BlockExecutionData related processing. It also includes expected parsed data for easy assertions.\n\n```go\nfunc CompleteFixture(t *testing.T, g *fixtures.GeneratorSuite, parentBlock *flow.Block) *TestFixture\n```\nCompleteFixture generates consistent test fixture data for testing BlockExecutionData related processing. The returned [TestFixture](#TestFixture) includes a [flow.Block](/github.com/onflow/flow-go/model/flow#Block), [flow.ExecutionResult](/github.com/onflow/flow-go/model/flow#ExecutionResult) and [execution\\_data.BlockExecutionData](/github.com/onflow/flow-go/module/executiondatasync/execution_data#BlockExecutionData), all internally consistent and using consistent randomness.\n\nproperties:\n\n  - The block execution data contains collections for each of the block's guarantees, plus the system chunk\n  - Each collection has 3 transactions\n  - The first path in each trie update is the same, testing that the indexer will use the last value\n  - Every 3rd transaction is failed\n  - There are tx error messages for all failed transactions\n  - There is an execution result for the block, whose ExecutionDataID matches the BlockExecutionData\n\n```go\nfunc (tf *TestFixture) ExecutionDataEntity() *execution_data.BlockExecutionDataEntity\n```\n\n","path":"github.com/onflow/flow-go/module/executiondatasync/testutil","name":"testutil","synopsis":"","isRedistributable":true}
