conformance

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package conformance is the shared behavioral test suite every OmniWorkflow provider must pass. It is the load-bearing proof that the Step Functions and Temporal providers are interchangeable: both run the identical scenarios through the WorkflowProvider interface and a StepExecutor, so any semantic drift between them surfaces as a suite failure rather than a production surprise.

It follows the systemforge providertest pattern: a provider's _test.go constructs a Config and calls Run.

func TestConformance(t *testing.T) {
    p, _ := stepfunctions.NewFromConfig(ctx, cfg, opts)
    conformance.Run(t, conformance.Config{
        Provider:  p,
        NewWorker: p.NewWorker,
    })
}

Run drives a live backend, so a provider gates its call behind whatever credentials/resources it needs (see each provider's conformance_test.go).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, cfg Config)

Run executes the full conformance suite against cfg.Provider. It starts one worker (bound to a per-run-routing executor) for the duration of the suite.

Types

type Config

type Config struct {
	// Provider is the implementation under test (required).
	Provider omniworkflow.WorkflowProvider
	// NewWorker builds a worker bound to the suite's executor (required). For
	// most providers this is the provider's own NewWorker method value.
	NewWorker func(omniworkflow.StepExecutor) omniworkflow.Worker
	// RunIDPrefix namespaces run IDs so repeated live runs do not collide with
	// retained execution history. Defaults to "conf".
	RunIDPrefix string
	// Timeout bounds how long a scenario waits for a run to reach a terminal
	// status. Defaults to 90s.
	Timeout time.Duration
	// PollInterval is how often terminal status is polled. Defaults to 1s.
	PollInterval time.Duration
}

Config configures a conformance run.

Jump to

Keyboard shortcuts

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