utils

package
v0.0.0-...-492d73e Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 logicalcluster.Name,
	apiExportName string,
) string

func CreateWorkspace

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

func GetClient

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

func GetClusterClient

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

func GetKcpAdminClient

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

func GetKcpAdminClusterClient

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

func GetKcpAdminKubeconfig

func GetKcpAdminKubeconfig(t *testing.T) string

func GrantWorkspaceAccess

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

func RunAgent

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

func RunEnvtest

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

func ToUnstructured

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

func WaitForBoundAPI

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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