mappingtest

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mappingtest provides shared test helpers for integration mapping tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFiltered

func AssertFiltered(t *testing.T, spec types.MappingOverride, envelope types.MappingEnvelope) bool

AssertFiltered evaluates the filter expression against the envelope and returns whether it matched

func EvalMap

func EvalMap(t *testing.T, spec types.MappingOverride, envelope types.MappingEnvelope) map[string]any

EvalMap evaluates the map expression for the given spec and envelope, returning the result as a map

func LoadExample

func LoadExample(t *testing.T, dir, name string) json.RawMessage

LoadExample reads a JSON file from the given directory and returns it as a raw message

func MappingSpec

func MappingSpec(t *testing.T, mappings []types.MappingRegistration, schema string) types.MappingOverride

MappingSpec returns the MappingOverride for the first mapping matching schema in the list

func MappingSpecForVariant

func MappingSpecForVariant(t *testing.T, mappings []types.MappingRegistration, schema, variant string) types.MappingOverride

MappingSpecForVariant returns the MappingOverride for the mapping matching both schema and variant

Types

This section is empty.

Jump to

Keyboard shortcuts

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