test

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Overview

Copyright Red Hat

Copyright Red Hat

Index

Constants

View Source
const (

	// The compute workspace (where RegisteredCluster is created)
	ComputeWorkspace string = "my-compute-ws"
	// The location workspace (where SyncTarget is generated)
	LocationWorkspace string = "my-location-ws"
	// The controller service account on the compute
	ControllerComputeServiceAccount string = "compute-operator"
	// the namespace on the compute
	ControllerComputeServiceAccountNamespace string = "sa-ws"
	// The compute organization
	ComputeOrganization string = "my-org"
	// The compute organization workspace
	OrganizationWorkspace string = "root:" + ComputeOrganization
	// The compute cluster workspace
	AbsoluteComputeWorkspace  string = OrganizationWorkspace + ":" + ComputeWorkspace
	AbsoluteLocationWorkspace string = OrganizationWorkspace + ":" + LocationWorkspace
	// The directory for test environment assets
	TestEnvDir string = ".testenv"
	// the test environment kubeconfig file
	TestEnvKubeconfigFile string = TestEnvDir + "/testenv.kubeconfig"
	// The service account compute kubeconfig file
	SAComputeKubeconfigDir  string = ".sakcp"
	SAComputeKubeconfigFile string = SAComputeKubeconfigDir + "/kubeconfig-" + ControllerComputeServiceAccount + ".yaml"
)

Variables

View Source
var (
	TestEnv *envtest.Environment

	// The compute kubeconfig file
	AdminComputeKubeconfigFile string = ".kcp/admin.kubeconfig"
)

Functions

func CreateAPIBinding

func CreateAPIBinding(computeContext context.Context, computeAdminApplierBuilder *clusteradmapply.ApplierBuilder, readerResources *clusteradmasset.ScenarioResourcesReader) error

func CreateWorkspace

func CreateWorkspace(workspace string, absoluteParent string, adminComputeKubeconfigFile string, enter bool) error

func GetScenarioResourcesReader

func GetScenarioResourcesReader() *asset.ScenarioResourcesReader

func InitControllerEnvironment

func InitControllerEnvironment(scheme *runtime.Scheme, controllerNamespace string, controllerRestConfig *rest.Config, hubKubeconfigString string)

func PersistAndGetRestConfig

func PersistAndGetRestConfig(useExistingCluster bool) (string, *rest.Config, error)

func SetupCompute

func SetupCompute(scheme *runtime.Scheme, controllerNamespace, scriptsPath string) (computeContext context.Context,
	computeRuntimeWorkspaceClient client.Client, apiExportVirtualWorkspaceKubeClient kubernetes.Interface)

func SetupControllerEnvironment

func SetupControllerEnvironment(scheme *runtime.Scheme,
	controllerNamespace string,
	crdDirectoryPaths []string) (
	controllerRestConfig *rest.Config,
	hubKubeconfigString string)

func TearDownCompute

func TearDownCompute()

func UseWorkspace

func UseWorkspace(workspace string, adminComputeKubeconfigFile string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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