testmodel

package
v2.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package testmodel contains schema types for data files used in parameterized tests. The actual data files are in subdirectories of data/data-files.

Index

Constants

View Source
const DefaultForAllTypes servicedef.ValueType = "allDefaults"

Variables

This section is empty.

Functions

This section is empty.

Types

type EvalTest

type EvalTest struct {
	Name      string                     `json:"name"`
	FlagKey   string                     `json:"flagKey"`
	Context   o.Maybe[ldcontext.Context] `json:"context"` // used only for server-side tests
	ValueType servicedef.ValueType       `json:"valueType"`
	Default   ldvalue.Value              `json:"default"`
	Expect    ValueDetail                `json:"expect"`
}

type EvalTestSuite

type EvalTestSuite[SDKDataType any] struct {
	Name                 string                     `json:"name"`
	RequireCapability    string                     `json:"requireCapability"`
	SkipEvaluateAllFlags bool                       `json:"skipEvaluateAllFlags"`
	SDKData              SDKDataType                `json:"sdkData"`
	Context              o.Maybe[ldcontext.Context] `json:"context"` // used only for client-side tests
	Evaluations          []EvalTest                 `json:"evaluations"`
}

func (EvalTestSuite[SDKDataType]) GetName

func (s EvalTestSuite[SDKDataType]) GetName() string

type ValueDetail

type ValueDetail struct {
	Value          ldvalue.Value             `json:"value"`
	VariationIndex o.Maybe[int]              `json:"variationIndex"`
	Reason         ldreason.EvaluationReason `json:"reason"`
}

Jump to

Keyboard shortcuts

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