testfixture

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package testfixture provides shared test helpers for per-table snapshot tests across the flattener domain packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertSnapshot

func AssertSnapshot(
	t *testing.T,
	batch route.ColumnarBatch,
	event *xatu.DecoratedEvent,
	expectedRows int,
	checks map[string]any,
)

AssertSnapshot flattens the event into the batch and asserts row count, column values, and column alignment. FixedString null-byte padding is trimmed before string comparisons.

func BaseMeta

func BaseMeta() *xatu.Meta

BaseMeta returns a reusable Meta with known deterministic values.

func EpochAdditional

func EpochAdditional() *xatu.EpochV2

EpochAdditional returns common epoch additional data for beacon tests.

func MetaWithAdditional

func MetaWithAdditional(ad *xatu.ClientMeta) *xatu.Meta

MetaWithAdditional returns BaseMeta with the given additional_data set. The provided ClientMeta's AdditionalData field is preserved while all standard fields are overwritten with deterministic test values.

func PropagationAdditional

func PropagationAdditional() *xatu.PropagationV2

PropagationAdditional returns common propagation additional data.

func SlotEpochAdditional

func SlotEpochAdditional() *xatu.SlotV2

SlotEpochAdditional returns common slot additional data for beacon tests.

func TS

func TS() *timestamppb.Timestamp

TS returns a deterministic timestamp for tests.

func WallclockEpochAdditional

func WallclockEpochAdditional() *xatu.EpochV2

WallclockEpochAdditional returns common wallclock epoch additional data.

func WallclockSlotAdditional

func WallclockSlotAdditional() *xatu.SlotV2

WallclockSlotAdditional returns common wallclock slot additional data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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