package
0.0.1-alpha.1
Repository: https://github.com/cloudoperators/greenhouse.git
Documentation: pkg.go.dev

# Functions

DummyTailscaleClienGetter is a dummy tailscale client getter for testing purposes.
EventuallyGet gets the object and retries until it is available.
EventuallyDeleted deletes the object and waits until it is gone.
GreenhouseV1Alpha1Scheme returns a new runtime.Scheme with the Greenhouse v1alpha1 scheme added.
KubeconfigFromEnvVar returns the kubeconfig []byte from the path specified in the environment variable.
MustDeleteCluster is used in the test context only and removes a cluster by namespaced name.
MustReturnJSONFor marshals val to JSON and returns an apiextensionsv1.JSON.
NewTestSetup creates a new TestSetup object and a new namespace on the cluster for the test.
RegisterController registers a controller for the testbed.
RegisterWebhook registers a webhook for the testbed.
Starts a envTest control plane and returns the config, client, envtest.Environment and raw kubeconfig.
UnregisterController removes a controller from the testbed.
UnregisterWebhook removes a webhook from the testbed.
WithAccessMode sets the ClusterAccessMode on a Cluster.
WithAggregationRule sets the AggregationRule on a TeamRole.
No description provided by the author
No description provided by the author
WithLabel sets the label on a Cluster.
WithLabels sets the .spec.Labels on a TeamRole.
No description provided by the author
No description provided by the author
WithRules overrides the default rules of a TeamRole.
WithSecretData sets the data of the Secret.
WithSecretType sets the type of the Secret.
No description provided by the author
No description provided by the author

# Constants

TestNamespace is the namespace used for testing.

# Variables

Cfg is the rest.Config to access the cluster the tests are running against.
No description provided by the author
Ctx is the context to use for the tests.
IsUseExistingCluster is true if the tests are running against an existing cluster.
K8sClient is the client.Client to access the cluster the tests are running against.
K8sManager is the ctrl.Manager the controllers are run by.
KubeConfig is the raw kubeconfig to access the cluster the tests are running against.
RestClientGetter is the clientutil.RestClientGetter to access the cluster the tests are running against.
TestAfterSuite configures the test suite.
TestBeforeSuite configures the test suite.

# Structs

FakeHeadscaleClient is a fake implementation of the HeadscaleClient interface.
No description provided by the author