mocks

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	informertest.FakeInformers
}

func (*Cache) Get

func (_m *Cache) Get(ctx context.Context, key types.NamespacedName, obj runtime.Object) error

Get on this mock will always return object not found.

type Handler

type Handler struct {
	mock.Mock
}

Handler is an autogenerated mock type for the Handler type

func (*Handler) Handle

func (_m *Handler) Handle(_a0 context.Context, _a1 runtime.Object) error

Handle provides a mock function with given fields: _a0, _a1

type K8sResource

type K8sResource struct {
	mock.Mock
}

K8sResource is an autogenerated mock type for the K8sResource type

func (*K8sResource) DeepCopyObject

func (_m *K8sResource) DeepCopyObject() runtime.Object

DeepCopyObject provides a mock function with given fields:

func (*K8sResource) GetAnnotations

func (_m *K8sResource) GetAnnotations() map[string]string

GetAnnotations provides a mock function with given fields:

func (*K8sResource) GetClusterName

func (_m *K8sResource) GetClusterName() string

GetClusterName provides a mock function with given fields:

func (*K8sResource) GetCreationTimestamp

func (_m *K8sResource) GetCreationTimestamp() v1.Time

GetCreationTimestamp provides a mock function with given fields:

func (*K8sResource) GetDeletionGracePeriodSeconds

func (_m *K8sResource) GetDeletionGracePeriodSeconds() *int64

GetDeletionGracePeriodSeconds provides a mock function with given fields:

func (*K8sResource) GetDeletionTimestamp

func (_m *K8sResource) GetDeletionTimestamp() *v1.Time

GetDeletionTimestamp provides a mock function with given fields:

func (*K8sResource) GetFinalizers

func (_m *K8sResource) GetFinalizers() []string

GetFinalizers provides a mock function with given fields:

func (*K8sResource) GetGenerateName

func (_m *K8sResource) GetGenerateName() string

GetGenerateName provides a mock function with given fields:

func (*K8sResource) GetGeneration

func (_m *K8sResource) GetGeneration() int64

GetGeneration provides a mock function with given fields:

func (*K8sResource) GetInitializers

func (_m *K8sResource) GetInitializers() *v1.Initializers

GetInitializers provides a mock function with given fields:

func (*K8sResource) GetLabels

func (_m *K8sResource) GetLabels() map[string]string

GetLabels provides a mock function with given fields:

func (*K8sResource) GetName

func (_m *K8sResource) GetName() string

GetName provides a mock function with given fields:

func (*K8sResource) GetNamespace

func (_m *K8sResource) GetNamespace() string

GetNamespace provides a mock function with given fields:

func (*K8sResource) GetObjectKind

func (_m *K8sResource) GetObjectKind() schema.ObjectKind

GetObjectKind provides a mock function with given fields:

func (*K8sResource) GetOwnerReferences

func (_m *K8sResource) GetOwnerReferences() []v1.OwnerReference

GetOwnerReferences provides a mock function with given fields:

func (*K8sResource) GetResourceVersion

func (_m *K8sResource) GetResourceVersion() string

GetResourceVersion provides a mock function with given fields:

func (_m *K8sResource) GetSelfLink() string

GetSelfLink provides a mock function with given fields:

func (*K8sResource) GetUID

func (_m *K8sResource) GetUID() types.UID

GetUID provides a mock function with given fields:

func (*K8sResource) GroupVersionKind

func (_m *K8sResource) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind provides a mock function with given fields:

func (*K8sResource) SetAnnotations

func (_m *K8sResource) SetAnnotations(annotations map[string]string)

SetAnnotations provides a mock function with given fields: annotations

func (*K8sResource) SetClusterName

func (_m *K8sResource) SetClusterName(clusterName string)

SetClusterName provides a mock function with given fields: clusterName

func (*K8sResource) SetCreationTimestamp

func (_m *K8sResource) SetCreationTimestamp(timestamp v1.Time)

SetCreationTimestamp provides a mock function with given fields: timestamp

func (*K8sResource) SetDeletionGracePeriodSeconds

func (_m *K8sResource) SetDeletionGracePeriodSeconds(_a0 *int64)

SetDeletionGracePeriodSeconds provides a mock function with given fields: _a0

func (*K8sResource) SetDeletionTimestamp

func (_m *K8sResource) SetDeletionTimestamp(timestamp *v1.Time)

SetDeletionTimestamp provides a mock function with given fields: timestamp

func (*K8sResource) SetFinalizers

func (_m *K8sResource) SetFinalizers(finalizers []string)

SetFinalizers provides a mock function with given fields: finalizers

func (*K8sResource) SetGenerateName

func (_m *K8sResource) SetGenerateName(name string)

SetGenerateName provides a mock function with given fields: name

func (*K8sResource) SetGeneration

func (_m *K8sResource) SetGeneration(generation int64)

SetGeneration provides a mock function with given fields: generation

func (*K8sResource) SetGroupVersionKind

func (_m *K8sResource) SetGroupVersionKind(kind schema.GroupVersionKind)

SetGroupVersionKind provides a mock function with given fields: kind

func (*K8sResource) SetInitializers

func (_m *K8sResource) SetInitializers(initializers *v1.Initializers)

SetInitializers provides a mock function with given fields: initializers

func (*K8sResource) SetLabels

func (_m *K8sResource) SetLabels(labels map[string]string)

SetLabels provides a mock function with given fields: labels

func (*K8sResource) SetName

func (_m *K8sResource) SetName(name string)

SetName provides a mock function with given fields: name

func (*K8sResource) SetNamespace

func (_m *K8sResource) SetNamespace(namespace string)

SetNamespace provides a mock function with given fields: namespace

func (*K8sResource) SetOwnerReferences

func (_m *K8sResource) SetOwnerReferences(_a0 []v1.OwnerReference)

SetOwnerReferences provides a mock function with given fields: _a0

func (*K8sResource) SetResourceVersion

func (_m *K8sResource) SetResourceVersion(version string)

SetResourceVersion provides a mock function with given fields: version

func (_m *K8sResource) SetSelfLink(selfLink string)

SetSelfLink provides a mock function with given fields: selfLink

func (*K8sResource) SetUID

func (_m *K8sResource) SetUID(uid types.UID)

SetUID provides a mock function with given fields: uid

type K8sResourceHandler

type K8sResourceHandler struct {
	mock.Mock
}

K8sResourceHandler is an autogenerated mock type for the K8sResourceHandler type

func (*K8sResourceHandler) BuildIdentityResource

func (_m *K8sResourceHandler) BuildIdentityResource(ctx context.Context, taskCtx types.TaskContext) (flytek8s.K8sResource, error)

BuildIdentityResource provides a mock function with given fields: ctx, taskCtx

func (*K8sResourceHandler) BuildResource

func (_m *K8sResourceHandler) BuildResource(ctx context.Context, taskCtx types.TaskContext, task *core.TaskTemplate, inputs *core.LiteralMap) (flytek8s.K8sResource, error)

BuildResource provides a mock function with given fields: ctx, taskCtx, task, inputs

func (*K8sResourceHandler) GetProperties added in v0.1.5

func (_m *K8sResourceHandler) GetProperties() types.ExecutorProperties

GetProperties provides a mock function with given fields:

func (*K8sResourceHandler) GetTaskStatus

GetTaskStatus provides a mock function with given fields: ctx, taskCtx, resource

type MockRuntimeClient

type MockRuntimeClient struct {
	Cache    map[string]runtime.Object
	CreateCb func(ctx context.Context, obj runtime.Object) (err error)
	GetCb    func(ctx context.Context, key client.ObjectKey, out runtime.Object) error
	ListCb   func(ctx context.Context, opts *client.ListOptions, list runtime.Object) error
	// contains filtered or unexported fields
}

func NewMockRuntimeClient

func NewMockRuntimeClient() *MockRuntimeClient

func (MockRuntimeClient) Create

func (m MockRuntimeClient) Create(ctx context.Context, obj runtime.Object) (err error)

func (*MockRuntimeClient) Delete

func (MockRuntimeClient) Get

func (MockRuntimeClient) List

func (*MockRuntimeClient) Status

func (*MockRuntimeClient) Update

func (m *MockRuntimeClient) Update(ctx context.Context, obj runtime.Object) error

Jump to

Keyboard shortcuts

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