test

package
v0.0.0-...-6390b4e Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCommandExecutor

type FakeCommandExecutor struct {
	Command       string
	CommandResult map[string]string
}

FakeCommandExecutor - fake command executor

func GetFakeCommandExecutor

func GetFakeCommandExecutor() *FakeCommandExecutor

GetFakeCommandExecutor - get fake command executor

func (*FakeCommandExecutor) Stream

Stream - stream command result

func (*FakeCommandExecutor) StreamWithContext

func (f *FakeCommandExecutor) StreamWithContext(ctx context.Context, options remoteCommand.StreamOptions) error

StreamWithContext - stream command result with given context

type FakeFactory

type FakeFactory struct {
	SetFail struct {
		GetConfigClient bool
	}
	// contains filtered or unexported fields
}

FakeFactory - fake factory

func GetFakeFactory

func GetFakeFactory() *FakeFactory

GetEmptyFakeFactory - get empty fake factory

func (*FakeFactory) GetAWSClient

func (f *FakeFactory) GetAWSClient() bbAws.Client

GetAWSClient - get aws client

func (*FakeFactory) GetClientSet

func (f *FakeFactory) GetClientSet() (kubernetes.Interface, error)

GetClientSet - get clientset

func (*FakeFactory) GetCommandExecutor

func (f *FakeFactory) GetCommandExecutor(cmd *cobra.Command, pod *coreV1.Pod, container string, command []string, stdout io.Writer, stderr io.Writer) (remoteCommand.Executor, error)

GetCommandExecutor - execute command in a Pod

func (*FakeFactory) GetCommandWrapper

func (f *FakeFactory) GetCommandWrapper(name string, args ...string) *bbUtilApiWrappers.Command

GetCommandWrapper - get command wrapper

func (*FakeFactory) GetConfigClient

func (f *FakeFactory) GetConfigClient(command *cobra.Command) (*bbConfig.ConfigClient, error)

GetConfigClient - get config client

func (*FakeFactory) GetCredentialHelper

func (f *FakeFactory) GetCredentialHelper() func(string, string) string

GetCredentialHelper - get credential helper

func (*FakeFactory) GetHelmClient

func (f *FakeFactory) GetHelmClient(cmd *cobra.Command, namespace string) (helm.Client, error)

GetHelmClient - get helm client

func (*FakeFactory) GetIstioClientSet

func (f *FakeFactory) GetIstioClientSet(cfg *rest.Config) (bbUtilApiWrappers.IstioClientset, error)

GetIstioClientSet - get istio clientset

func (*FakeFactory) GetK8sClientset

func (f *FakeFactory) GetK8sClientset(cmd *cobra.Command) (kubernetes.Interface, error)

GetK8sClientset - get k8s clientset

func (*FakeFactory) GetK8sDynamicClient

func (f *FakeFactory) GetK8sDynamicClient(cmd *cobra.Command) (dynamic.Interface, error)

GetK8sDynamicClient - get k8s dynamic client

func (*FakeFactory) GetLoggingClient

func (f *FakeFactory) GetLoggingClient() bbLog.Client

GetLoggingClient - get logging client

func (*FakeFactory) GetLoggingClientWithLogger

func (f *FakeFactory) GetLoggingClientWithLogger(logger *slog.Logger) bbLog.Client

GetLoggingClientWithLogger - get logging client providing logger

func (*FakeFactory) GetRestConfig

func (f *FakeFactory) GetRestConfig(cmd *cobra.Command) (*rest.Config, error)

GetRestConfig - get rest config

func (*FakeFactory) GetRuntimeClient

func (f *FakeFactory) GetRuntimeClient(scheme *runtime.Scheme) (client.Client, error)

GetRuntimeClient - get runtime client

func (*FakeFactory) GetViper

func (f *FakeFactory) GetViper() *viper.Viper

GetViper - get viper

func (*FakeFactory) SetAWSConfig

func (f *FakeFactory) SetAWSConfig(awsConfig *aws.Config)

SetAWSConfig - set aws config

func (*FakeFactory) SetCallerIdentity

func (f *FakeFactory) SetCallerIdentity(callerIdentity *bbAws.CallerIdentity)

SetCallerIdentity - set caller identity

func (*FakeFactory) SetClusterIPs

func (f *FakeFactory) SetClusterIPs(clusterIPs *[]bbAws.ClusterIP)

SetClusterIPs - set cluster IPs

func (*FakeFactory) SetEC2Client

func (f *FakeFactory) SetEC2Client(ec2Client *ec2.Client)

SetEC2Client - set ec2 client

func (*FakeFactory) SetGVRToListKind

func (f *FakeFactory) SetGVRToListKind(gvrToListKind map[schema.GroupVersionResource]string)

SetGVRToListKind - set gvr to list kind

func (*FakeFactory) SetHelmReleases

func (f *FakeFactory) SetHelmReleases(helmReleases []*release.Release)

SetHelmReleases - set helm releases

func (*FakeFactory) SetLoggingFunc

func (f *FakeFactory) SetLoggingFunc(loggingFunc fakeLog.LoggingFunction)

SetLoggingFunc - set logging function

func (*FakeFactory) SetObjects

func (f *FakeFactory) SetObjects(objects []runtime.Object)

SetObjects - set objects

func (*FakeFactory) SetResources

func (f *FakeFactory) SetResources(resources []*metaV1.APIResourceList)

SetResources - set resources

func (*FakeFactory) SetSTSClient

func (f *FakeFactory) SetSTSClient(stsClient *sts.Client)

SetSTSClient - set sts client

func (*FakeFactory) SetVirtualServices

func (f *FakeFactory) SetVirtualServices(virtualServices *apisV1Beta1.VirtualServiceList)

SetVirtualServices - set virtual services

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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