fake

package
v0.0.0-...-92d64a7 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fixtures

type Fixtures struct {
	Listers    *client.Listers
	KubeClient *kfake.Clientset
}

Fixtures holds fixtures for unit testing, in forms that are easily consumed by k8s and OpenShift interfaces.

type FixturesBuilder

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

FixturesBuilder helps create an in-memory version of client.Listers.

func NewFixturesBuilder

func NewFixturesBuilder() *FixturesBuilder

NewFixturesBuilder initializes a new instance of FakeListersFactory

func (*FixturesBuilder) AddClusterRoleBindings

func (f *FixturesBuilder) AddClusterRoleBindings(objs ...*rbacv1.ClusterRoleBinding) *FixturesBuilder

AddClusterRoleBindings adds rbacv1.ClusterRoleBindings to the lister cache

func (*FixturesBuilder) AddClusterRoles

func (f *FixturesBuilder) AddClusterRoles(objs ...*rbacv1.ClusterRole) *FixturesBuilder

AddClusterRoles adds rbacv1.ClusterRoles to the lister cache

func (*FixturesBuilder) AddConfigMaps

func (f *FixturesBuilder) AddConfigMaps(objs ...*corev1.ConfigMap) *FixturesBuilder

AddConfigMaps adds corev1.ConfigMaps to the lister cache

func (*FixturesBuilder) AddDeployments

func (f *FixturesBuilder) AddDeployments(objs ...*appsv1.Deployment) *FixturesBuilder

AddDeployments adds appsv1.Deployments to the lister cache

func (*FixturesBuilder) AddInfraConfig

func (f *FixturesBuilder) AddInfraConfig(config *configv1.Infrastructure) *FixturesBuilder

AddInfraConfig adds cluster-wide config.openshift.io/v1 Infrastructure to the lister cache

func (*FixturesBuilder) AddNamespaces

func (f *FixturesBuilder) AddNamespaces(objs ...*corev1.Namespace) *FixturesBuilder

AddNamespaces adds corev1.Namespaces to the fixture

func (*FixturesBuilder) AddNodes

func (f *FixturesBuilder) AddNodes(objs ...*corev1.Node) *FixturesBuilder

AddNodes adds corev1.Nodes to the lister cache

func (*FixturesBuilder) AddProxyConfig

func (f *FixturesBuilder) AddProxyConfig(config *configv1.Proxy) *FixturesBuilder

AddProxyConfig adds cluster-wide config.openshift.io/v1 Proxy to the lister cache

func (*FixturesBuilder) AddRegistryOperatorConfig

func (f *FixturesBuilder) AddRegistryOperatorConfig(config *regopv1.Config) *FixturesBuilder

AddRegistryOperatorConfig adds imageregistry.operator.openshift.io/v1 Config to the lister cache

func (*FixturesBuilder) AddRoutes

func (f *FixturesBuilder) AddRoutes(objs ...*routev1.Route) *FixturesBuilder

AddRoutes adds route.openshift.io/v1 Routes to the lister cahce

func (*FixturesBuilder) AddSecrets

func (f *FixturesBuilder) AddSecrets(objs ...*corev1.Secret) *FixturesBuilder

AddSecrets adds corev1.Secrets to the lister cache

func (*FixturesBuilder) AddServiceAccounts

func (f *FixturesBuilder) AddServiceAccounts(objs ...*corev1.ServiceAccount) *FixturesBuilder

AddServiceAccounts adds corev1.ServiceAccounts to the lister cache

func (*FixturesBuilder) AddServices

func (f *FixturesBuilder) AddServices(objs ...*corev1.Service) *FixturesBuilder

AddServices adds corev1.Services to the lister cache

func (*FixturesBuilder) Build

func (f *FixturesBuilder) Build() *Fixtures

Build creates the fixtures from the provided objects.

func (*FixturesBuilder) BuildListers

func (f *FixturesBuilder) BuildListers() *client.Listers

BuildListers creates an in-memory instance of client.Listers

Jump to

Keyboard shortcuts

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