test_generate

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixtureCodegenConsumers added in v1.0.4

func FixtureCodegenConsumers() []orm.ConsumerDef

FixtureCodegenConsumers is every fixture consumer, for the registrations that take every fixture entity.

func FixtureConsumers

func FixtureConsumers() []orm.ConsumerDef

FixtureConsumers are the consumers the fixtures declare.

test-indexer takes three entities so the multi-subject filter path is exercised, and generateEntityDirty is on both consumers so "one write, one message however many consumers" has something to prove.

func FixtureEntities

func FixtureEntities() []any

FixtureEntities is the registration list shared by TestGenerate and genboot.

func FixtureParityConsumer added in v1.0.4

func FixtureParityConsumer() orm.ConsumerDef

FixtureParityConsumer reads generateEntityParity, which a `cdc` tag requires. It is kept out of FixtureConsumers so tests that register a subset of the fixtures need not register the parity entity too.

func FixtureRegistry

func FixtureRegistry() orm.Registry

FixtureRegistry is a registry with the fixture tasks already registered. FixtureConsumers declares consumers for their queues, and a queue with no tasks is a startup error, so the two always travel together.

func FixtureTaskConsumers

func FixtureTaskConsumers() []orm.ConsumerDef

FixtureTaskConsumers drain the fixture queues. `default` is declared because SendPasswordReset names no queue and falls through to it - a queue nothing drains is a startup error.

Types

type FixtureTask

type FixtureTask struct {
	Task    any
	Options orm.TaskOptions
}

func FixtureTasks

func FixtureTasks() []FixtureTask

FixtureTasks are the tasks the generator emits dispatch functions and consumer builders for. They live in their own leaf packages because the generated package imports them, and a task package that imported anything generated would close a cycle.

The two packages deliberately share the base name `jobtasks`, so the generator's import aliasing has something to disambiguate.

Directories

Path Synopsis
Command genboot regenerates test_generate/entities without compiling the test binary.
Command genboot regenerates test_generate/entities without compiling the test binary.

Jump to

Keyboard shortcuts

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