test

package
v0.0.0-...-452f707 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetMemberClusters

func NewGetMemberClusters(memberClusters ...*cluster.CachedToolchainCluster) cluster.GetMemberClustersFunc

func NewMemberClusterWithClient

func NewMemberClusterWithClient(cl runtimeclient.Client, name string, status corev1.ConditionStatus, modifiers ...Modifier) *cluster.CachedToolchainCluster

func NewMemberClusterWithTenantRole

func NewMemberClusterWithTenantRole(t *testing.T, name string, status corev1.ConditionStatus) *cluster.CachedToolchainCluster

func NewMemberClusterWithoutClusterRoles

func NewMemberClusterWithoutClusterRoles(t *testing.T, name string, status corev1.ConditionStatus) *cluster.CachedToolchainCluster

NewMemberClusterWithoutClusterRoles returns a cached toolchaincluster config that doesn't have the default cluster-roles which a member cluster should have

Types

type ClientForCluster

type ClientForCluster func() (string, runtimeclient.Client)

func ClusterClient

func ClusterClient(name string, cl runtimeclient.Client) ClientForCluster

type ConfigMapAssertion

type ConfigMapAssertion struct {
	// contains filtered or unexported fields
}

func AssertThatConfigMap

func AssertThatConfigMap(t test.T, namespace, name string, client runtimeclient.Client) *ConfigMapAssertion

func (*ConfigMapAssertion) Exists

func (*ConfigMapAssertion) HasData

func (a *ConfigMapAssertion) HasData(data map[string]string) *ConfigMapAssertion

func (*ConfigMapAssertion) HasOwner

type GetMemberClusterFunc

type GetMemberClusterFunc func(clusters ...ClientForCluster) func(name string) (*cluster.CachedToolchainCluster, bool)

func NewGetMemberCluster

func NewGetMemberCluster(ok bool, status corev1.ConditionStatus, modifiers ...Modifier) GetMemberClusterFunc

type Modifier

type Modifier func(toolchainCluster *cluster.CachedToolchainCluster)

func WithClusterRoleLabel

func WithClusterRoleLabel(labelKey string) Modifier

type ServiceAccountAssertion

type ServiceAccountAssertion struct {
	// contains filtered or unexported fields
}

func AssertThatServiceAccount

func AssertThatServiceAccount(t test.T, namespace, name string, client runtimeclient.Client) *ServiceAccountAssertion

func (*ServiceAccountAssertion) Exists

func (*ServiceAccountAssertion) HasOwner

type UserSignupAssertion

type UserSignupAssertion struct {
	// contains filtered or unexported fields
}

func AssertThatUserSignup

func AssertThatUserSignup(t test.T, namespace, name string, client runtimeclient.Client) *UserSignupAssertion

func (*UserSignupAssertion) DoesNotHaveAnnotation

func (a *UserSignupAssertion) DoesNotHaveAnnotation(key string) *UserSignupAssertion

func (*UserSignupAssertion) Get

func (*UserSignupAssertion) HasAnnotation

func (a *UserSignupAssertion) HasAnnotation(key, value string) *UserSignupAssertion

func (*UserSignupAssertion) HasCompliantUsername

func (a *UserSignupAssertion) HasCompliantUsername(name string) *UserSignupAssertion

Checks that the CompliantUsername matches the given string and is less than the maxLegth (20 characsters)

func (*UserSignupAssertion) HasHomeSpace

func (a *UserSignupAssertion) HasHomeSpace(name string) *UserSignupAssertion

Checks that the HomeSpace matches the given string

func (*UserSignupAssertion) HasLabel

func (a *UserSignupAssertion) HasLabel(key, value string) *UserSignupAssertion

Jump to

Keyboard shortcuts

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