test

package
v0.0.0-...-ff2d967 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDummyClient

func NewDummyClient(k8sClient client.Client, opts map[string]string) client.Client

func NewFakeCache

func NewFakeCache(err error) cache.Cache

func SASecretOption

func SASecretOption(t *testing.T, cl client.Client, ns string) func(sa *corev1.ServiceAccount)

func Secret

func Secret(name, namespace, token string, secretType corev1.SecretType) *corev1.Secret

func SetEnv

func SetEnv(environments ...Environment) func()

Types

type DummyClient

type DummyClient struct {
	client.Client
	// contains filtered or unexported fields
}

func (*DummyClient) GetClusterRoleBinding

func (d *DummyClient) GetClusterRoleBinding(name string) (*rbacv1.ClusterRoleBinding, error)

func (*DummyClient) GetOAuthClient

func (d *DummyClient) GetOAuthClient(name string) (*oauthv1.OAuthClient, error)

func (*DummyClient) GetServiceAccount

func (d *DummyClient) GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)

type Environment

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

func Env

func Env(k, v string) Environment

type FakeCache

type FakeCache struct {
	Err error
}

func (*FakeCache) Get

func (c *FakeCache) Get(ctx context.Context, key client.ObjectKey, obj runtime.Object) error

func (*FakeCache) GetInformer

func (*FakeCache) GetInformerForKind

func (c *FakeCache) GetInformerForKind(gvk schema.GroupVersionKind) (toolscache.SharedIndexInformer, error)

func (*FakeCache) IndexField

func (c *FakeCache) IndexField(obj runtime.Object, field string, extractValue client.IndexerFunc) error

func (*FakeCache) List

func (c *FakeCache) List(ctx context.Context, opts *client.ListOptions, list runtime.Object) error

func (*FakeCache) Start

func (c *FakeCache) Start(stopCh <-chan struct{}) error

func (*FakeCache) WaitForCacheSync

func (c *FakeCache) WaitForCacheSync(stop <-chan struct{}) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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