test_client_factory

package
v0.59.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRadiusCoreTestClientFactory

func NewRadiusCoreTestClientFactory(rootScope string, envServer func() corerpfake.EnvironmentsServer, recipepackServer func() corerpfake.RecipePacksServer, applicationsServer ...func() corerpfake.ApplicationsServer) (*v20250801preview.ClientFactory, error)

NewRadiusCoreTestClientFactory creates a new client factory for testing purposes. applicationsServer is variadic for backwards compatibility; only the first value (if any) is used.

func WithApplicationsServerNoError added in v0.58.0

func WithApplicationsServerNoError() corerpfake.ApplicationsServer

WithApplicationsServerNoError returns an ApplicationsServer with default success behavior.

func WithEnvironmentServer404OnGet added in v0.58.0

func WithEnvironmentServer404OnGet() corerpfake.EnvironmentsServer

WithEnvironmentServer404OnGet returns an EnvironmentsServer that returns 404 on Get and success on CreateOrUpdate, simulating a new environment creation scenario.

func WithEnvironmentServer500OnGet

func WithEnvironmentServer500OnGet() corerpfake.EnvironmentsServer

WithEnvironmentServer500OnGet returns an EnvironmentsServer that returns a non-404 server error on Get, simulating a transient/auth/network failure.

func WithEnvironmentServerCustomRecipePacks added in v0.58.0

func WithEnvironmentServerCustomRecipePacks(recipePacks []*string) func() corerpfake.EnvironmentsServer

WithEnvironmentServerCustomRecipePacks returns a factory function that creates an EnvironmentsServer with the given recipe pack IDs on Get, and success on CreateOrUpdate.

func WithEnvironmentServerNoError

func WithEnvironmentServerNoError() corerpfake.EnvironmentsServer

func WithEnvironmentServerNoRecipePacks added in v0.58.0

func WithEnvironmentServerNoRecipePacks() corerpfake.EnvironmentsServer

WithEnvironmentServerNoRecipePacks returns an EnvironmentsServer that returns an existing environment with no recipe packs on Get, and success on CreateOrUpdate.

func WithRecipePackServer404OnGet added in v0.58.0

func WithRecipePackServer404OnGet() corerpfake.RecipePacksServer

WithRecipePackServer404OnGet returns a RecipePacksServer that returns 404 on Get and success on CreateOrUpdate, simulating a scenario where recipe packs don't exist yet and need to be created.

func WithRecipePackServerConflictingTypes added in v0.58.0

func WithRecipePackServerConflictingTypes() corerpfake.RecipePacksServer

WithRecipePackServerConflictingTypes returns a RecipePacksServer where every pack returns the same resource type, simulating a conflict scenario.

func WithRecipePackServerCoreTypes added in v0.58.0

func WithRecipePackServerCoreTypes() corerpfake.RecipePacksServer

WithRecipePackServerCoreTypes returns a RecipePacksServer that maps core pack names to their actual core resource types. Other names get a unique test type.

func WithRecipePackServerInternalError added in v0.58.0

func WithRecipePackServerInternalError() corerpfake.RecipePacksServer

WithRecipePackServerInternalError returns a RecipePacksServer that returns a 500 internal server error on Get, simulating a transient or unexpected failure.

func WithRecipePackServerNoError

func WithRecipePackServerNoError() corerpfake.RecipePacksServer

func WithRecipePackServerUniqueTypes added in v0.58.0

func WithRecipePackServerUniqueTypes() corerpfake.RecipePacksServer

WithRecipePackServerUniqueTypes returns a RecipePacksServer where each pack name maps to a unique resource type based on the pack name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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