test_client_factory

package
v0.56.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 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) (*v20250801preview.ClientFactory, error)

NewRadiusCoreTestClientFactory creates a new client factory for testing purposes.

func WithEnvironmentServer404OnGet

func WithEnvironmentServer404OnGet() corerpfake.EnvironmentsServer

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

func WithEnvironmentServerCustomRecipePacks

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

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

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

func WithRecipePackServerConflictingTypes() corerpfake.RecipePacksServer

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

func WithRecipePackServerCoreTypes

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

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

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