utils

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 37 Imported by: 0 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 AcceptAllPermissionClaims added in v0.5.0

func AcceptAllPermissionClaims(t *testing.T, ctx context.Context, client ctrlruntimeclient.Client, apiExport *kcpapisv1alpha1.APIExport)

func AgentBinary

func AgentBinary(t *testing.T) string

func ApplyCRD

func ApplyCRD(t *testing.T, ctx context.Context, client ctrlruntimeclient.Client, filename string)

func ArtifactsDirectory

func ArtifactsDirectory(t *testing.T) string

func CreateAPIExport

func CreateAPIExport(t *testing.T, ctx context.Context, client ctrlruntimeclient.Client, name string, rbacSubject *rbacv1.Subject) *kcpapisv1alpha1.APIExport

func CreateKcpAgentKubeconfig

func CreateKcpAgentKubeconfig(t *testing.T, path string) string

func CreateOrganization

func CreateOrganization(
	t *testing.T,
	ctx context.Context,
	workspaceName string,
	apiExportName string,
) string

func CreateWorkspace

func CreateWorkspace(t *testing.T, ctx context.Context, client ctrlruntimeclient.Client, workspaceName string) logicalcluster.Name

func GetClient

func GetClient(t *testing.T, kubeconfig string) ctrlruntimeclient.Client

func GetClusterClient

func GetClusterClient(t *testing.T, kubeconfig string) mcclient.ClusterClient

func GetKcpAdminClient

func GetKcpAdminClient(t *testing.T) ctrlruntimeclient.Client

func GetKcpAdminClusterClient

func GetKcpAdminClusterClient(t *testing.T) mcclient.ClusterClient

func GetKcpAdminKubeconfig

func GetKcpAdminKubeconfig(t *testing.T) string

func GrantWorkspaceAccess

func GrantWorkspaceAccess(t *testing.T, ctx context.Context, client ctrlruntimeclient.Client, rbacSubject rbacv1.Subject, extraRules ...rbacv1.PolicyRule)

func KCPMinor added in v0.4.0

func KCPMinor() int

func RunAgent

func RunAgent(
	ctx context.Context,
	t *testing.T,
	name string,
	kcpKubeconfig string,
	localKubeconfig string,
	apiExportEndpointSlice string,
	labelSelector string,
) context.CancelFunc

func RunAgentWithMetrics added in v0.8.0

func RunAgentWithMetrics(
	ctx context.Context,
	t *testing.T,
	name string,
	kcpKubeconfig string,
	localKubeconfig string,
	apiExportEndpointSlice string,
	labelSelector string,
	metricsAddr string,
) context.CancelFunc

func RunEnvtest

func RunEnvtest(t *testing.T, extraCRDs []string) (string, ctrlruntimeclient.Client, context.CancelFunc)

func ToUnstructured added in v0.3.0

func ToUnstructured(t *testing.T, obj any) *unstructured.Unstructured

func WaitForBoundAPI

func WaitForBoundAPI(t *testing.T, ctx context.Context, client ctrlruntimeclient.Client, gvk schema.GroupVersionKind)

func YAMLToUnstructured added in v0.3.0

func YAMLToUnstructured(t *testing.T, data string) *unstructured.Unstructured

Types

This section is empty.

Jump to

Keyboard shortcuts

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