fake

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package fake provides a fake k8s client implementation.

Code generated by counterfeiter. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeHelmInvoker

func NewFakeHelmInvoker(namespace string, skipRelease bool, clientset kubernetes.Interface) k8s.HelmWrapper

NewFakeHelmInvoker returns a fake helm invoker for use in testing.

Types

type Client

type Client struct {
	HelmInvoker k8s.HelmWrapper
	// contains filtered or unexported fields
}

Client implements the k8s.Client interface.

func NewFakeK8s

func NewFakeK8s(namespace string, skipRelease bool, objects ...runtime.Object) *Client

NewFakeK8s creates a fake k8s client for unit tests.

func (*Client) APIExtensionClientSet

func (k *Client) APIExtensionClientSet() apiextension.Interface

APIExtensionClientSet return the clients interface.

func (*Client) APIRegistrationClientSet

func (k *Client) APIRegistrationClientSet() aggregator.Interface

APIRegistrationClientSet return the APIRegistrationClientSet interface.

func (*Client) ClientSet

func (k *Client) ClientSet() kubernetes.Interface

ClientSet return the clientset interface.

func (*Client) Config

func (k *Client) Config() *rest.Config

Config return a k8s rest.Config object.

func (*Client) DynamicClientSet

func (k *Client) DynamicClientSet() dynamic.Interface

DynamicClientSet return the DynamicClientset interface.

func (*Client) HelmAction

func (k *Client) HelmAction(string) (*action.Configuration, error)

HelmAction returns a helm action with a fake release.

func (*Client) MeshExists

func (k *Client) MeshExists() (bool, error)

MeshExists returns if the mesh exists.

func (*Client) MetricsClientSet

func (k *Client) MetricsClientSet() metrics.Interface

MetricsClientSet return the MetricsClientset interface.

func (*Client) Namespace

func (k *Client) Namespace() string

Namespace return the namespace we are using for k8s.

type FakeClient

type FakeClient struct {
	APIExtensionClientSetStub func() clientset.Interface

	APIRegistrationClientSetStub func() clientseta.Interface

	ClientSetStub func() kubernetes.Interface

	ConfigStub func() *rest.Config

	DynamicClientSetStub func() dynamic.Interface

	HelmActionStub func(string) (*action.Configuration, error)

	MeshExistsStub func() (bool, error)

	MetricsClientSetStub func() versioned.Interface

	NamespaceStub func() string
	// contains filtered or unexported fields
}

func (*FakeClient) APIExtensionClientSet

func (fake *FakeClient) APIExtensionClientSet() clientset.Interface

func (*FakeClient) APIExtensionClientSetCallCount

func (fake *FakeClient) APIExtensionClientSetCallCount() int

func (*FakeClient) APIExtensionClientSetCalls

func (fake *FakeClient) APIExtensionClientSetCalls(stub func() clientset.Interface)

func (*FakeClient) APIExtensionClientSetReturns

func (fake *FakeClient) APIExtensionClientSetReturns(result1 clientset.Interface)

func (*FakeClient) APIExtensionClientSetReturnsOnCall

func (fake *FakeClient) APIExtensionClientSetReturnsOnCall(i int, result1 clientset.Interface)

func (*FakeClient) APIRegistrationClientSet

func (fake *FakeClient) APIRegistrationClientSet() clientseta.Interface

func (*FakeClient) APIRegistrationClientSetCallCount

func (fake *FakeClient) APIRegistrationClientSetCallCount() int

func (*FakeClient) APIRegistrationClientSetCalls

func (fake *FakeClient) APIRegistrationClientSetCalls(stub func() clientseta.Interface)

func (*FakeClient) APIRegistrationClientSetReturns

func (fake *FakeClient) APIRegistrationClientSetReturns(result1 clientseta.Interface)

func (*FakeClient) APIRegistrationClientSetReturnsOnCall

func (fake *FakeClient) APIRegistrationClientSetReturnsOnCall(i int, result1 clientseta.Interface)

func (*FakeClient) ClientSet

func (fake *FakeClient) ClientSet() kubernetes.Interface

func (*FakeClient) ClientSetCallCount

func (fake *FakeClient) ClientSetCallCount() int

func (*FakeClient) ClientSetCalls

func (fake *FakeClient) ClientSetCalls(stub func() kubernetes.Interface)

func (*FakeClient) ClientSetReturns

func (fake *FakeClient) ClientSetReturns(result1 kubernetes.Interface)

func (*FakeClient) ClientSetReturnsOnCall

func (fake *FakeClient) ClientSetReturnsOnCall(i int, result1 kubernetes.Interface)

func (*FakeClient) Config

func (fake *FakeClient) Config() *rest.Config

func (*FakeClient) ConfigCallCount

func (fake *FakeClient) ConfigCallCount() int

func (*FakeClient) ConfigCalls

func (fake *FakeClient) ConfigCalls(stub func() *rest.Config)

func (*FakeClient) ConfigReturns

func (fake *FakeClient) ConfigReturns(result1 *rest.Config)

func (*FakeClient) ConfigReturnsOnCall

func (fake *FakeClient) ConfigReturnsOnCall(i int, result1 *rest.Config)

func (*FakeClient) DynamicClientSet

func (fake *FakeClient) DynamicClientSet() dynamic.Interface

func (*FakeClient) DynamicClientSetCallCount

func (fake *FakeClient) DynamicClientSetCallCount() int

func (*FakeClient) DynamicClientSetCalls

func (fake *FakeClient) DynamicClientSetCalls(stub func() dynamic.Interface)

func (*FakeClient) DynamicClientSetReturns

func (fake *FakeClient) DynamicClientSetReturns(result1 dynamic.Interface)

func (*FakeClient) DynamicClientSetReturnsOnCall

func (fake *FakeClient) DynamicClientSetReturnsOnCall(i int, result1 dynamic.Interface)

func (*FakeClient) HelmAction

func (fake *FakeClient) HelmAction(arg1 string) (*action.Configuration, error)

func (*FakeClient) HelmActionArgsForCall

func (fake *FakeClient) HelmActionArgsForCall(i int) string

func (*FakeClient) HelmActionCallCount

func (fake *FakeClient) HelmActionCallCount() int

func (*FakeClient) HelmActionCalls

func (fake *FakeClient) HelmActionCalls(stub func(string) (*action.Configuration, error))

func (*FakeClient) HelmActionReturns

func (fake *FakeClient) HelmActionReturns(result1 *action.Configuration, result2 error)

func (*FakeClient) HelmActionReturnsOnCall

func (fake *FakeClient) HelmActionReturnsOnCall(i int, result1 *action.Configuration, result2 error)

func (*FakeClient) Invocations

func (fake *FakeClient) Invocations() map[string][][]interface{}

func (*FakeClient) MeshExists

func (fake *FakeClient) MeshExists() (bool, error)

func (*FakeClient) MeshExistsCallCount

func (fake *FakeClient) MeshExistsCallCount() int

func (*FakeClient) MeshExistsCalls

func (fake *FakeClient) MeshExistsCalls(stub func() (bool, error))

func (*FakeClient) MeshExistsReturns

func (fake *FakeClient) MeshExistsReturns(result1 bool, result2 error)

func (*FakeClient) MeshExistsReturnsOnCall

func (fake *FakeClient) MeshExistsReturnsOnCall(i int, result1 bool, result2 error)

func (*FakeClient) MetricsClientSet

func (fake *FakeClient) MetricsClientSet() versioned.Interface

func (*FakeClient) MetricsClientSetCallCount

func (fake *FakeClient) MetricsClientSetCallCount() int

func (*FakeClient) MetricsClientSetCalls

func (fake *FakeClient) MetricsClientSetCalls(stub func() versioned.Interface)

func (*FakeClient) MetricsClientSetReturns

func (fake *FakeClient) MetricsClientSetReturns(result1 versioned.Interface)

func (*FakeClient) MetricsClientSetReturnsOnCall

func (fake *FakeClient) MetricsClientSetReturnsOnCall(i int, result1 versioned.Interface)

func (*FakeClient) Namespace

func (fake *FakeClient) Namespace() string

func (*FakeClient) NamespaceCallCount

func (fake *FakeClient) NamespaceCallCount() int

func (*FakeClient) NamespaceCalls

func (fake *FakeClient) NamespaceCalls(stub func() string)

func (*FakeClient) NamespaceReturns

func (fake *FakeClient) NamespaceReturns(result1 string)

func (*FakeClient) NamespaceReturnsOnCall

func (fake *FakeClient) NamespaceReturnsOnCall(i int, result1 string)

Jump to

Keyboard shortcuts

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