testutils

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 15 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCacheRespectOrgDependency

func CheckCacheRespectOrgDependency(
	t *testing.T,
	configKey string,
	httpResponseFn func(isFirstCall bool) any,
	initFunc func(engine workflow.Engine) error,
	expectedValueBeforeOrgChange any,
	expectedValueAfterOrgChange any,
	contentType ...string,
)

CheckCacheRespectOrgDependency tests ORGANIZATION-based cache invalidation with HTTP API call mocking. Verifies cache is cleared when ORGANIZATION changes and API is called again with new org.

func CheckConfigCachesDependency

func CheckConfigCachesDependency(
	t *testing.T,
	configKey string,
	dependencyKey string,
	defaultValueFuncFactory func(engine workflow.Engine) configuration.DefaultValueFunction,
	dependencyValueBefore any,
	dependencyValueAfter any,
	expectedValueBefore any,
	expectedValueAfter any,
)

CheckConfigCachesDependency tests that a config value properly invalidates its cache when a dependency changes. This is for testing config-to-config dependencies (e.g., ConfigurationSastEnabled depends on ConfigurationSastSettings).

func NewErrorProducingTestClient

func NewErrorProducingTestClient(fn roundTripErrorFn) *http.Client

func NewTestClient

func NewTestClient(fn roundTripFn) *http.Client

NewTestClient return *http.Client with Transport replaced to avoid making real calls

Types

This section is empty.

Jump to

Keyboard shortcuts

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