package testing

import "github.com/influxdata/flux/dependencies/testing"

Index

Functions

func Check

func Check(ctx context.Context) error

Check will check that all testing expectations have been met. This is a no-op if testing dependencies are not present.

func ExpectPlannerRule

func ExpectPlannerRule(ctx context.Context, name string, n int) error

ExpectPlannerRule will mark that a planner rule is expected to be executed n number of times.

This returns an error if testing dependencies have not been configured.

func Inject

func Inject(ctx context.Context) context.Context

Inject will inject the testing dependencies into the context.

func MarkInvokedPlannerRule

func MarkInvokedPlannerRule(ctx context.Context, name string)

MarkInvokedPlannerRule will mark that a planner rule was invoked and record that information in the testing dependencies.

This method is a no-op if testing dependencies are not present.

Types

type FrameworkConfig

type FrameworkConfig struct{}

FrameworkConfig is the testing framework configuration. This can be used to inject the testing framework as a dependency.

func (FrameworkConfig) Inject

Source Files

testing.go

Version
v0.196.1 (latest)
Published
Feb 19, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
1 day ago

Tools for package owners.