testutils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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