helpers

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: UPL-1.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertPrivateRegistryEnvVars added in v1.5.4

func AssertPrivateRegistryEnvVars(t *testing.T, client client.Client, deployment *appsv1.Deployment, expectedImageRegistry, expectedImagePrefix string)

AssertPrivateRegistryEnvVars asserts that the deployment container has the expected private registry environment variables

func AssertPrivateRegistryImage added in v1.5.4

func AssertPrivateRegistryImage(t *testing.T, client client.Client, deployment *appsv1.Deployment, expectedImageRegistry, expectedImagePrefix string)

AssertPrivateRegistryImage asserts that the deployment container and init container VPO images have the correct registry and prefix for private registry

func CreateTestVPOObjects

func CreateTestVPOObjects() []client.Object

func CreateVPOPod

func CreateVPOPod(name string) client.Object

func CreateVPOReplicaset

func CreateVPOReplicaset(name string) client.Object

func CreateVerrazzanoObject

func CreateVerrazzanoObject() client.Object

func CreateVerrazzanoObjectWithVersion

func CreateVerrazzanoObjectWithVersion() client.Object

func VerifyLastAppliedConfigAnnotation added in v1.5.4

func VerifyLastAppliedConfigAnnotation(t *testing.T, object v1.ObjectMeta, expectedLastAppliedConfigAnnotation string)

Types

type FakeRootCmdContext

type FakeRootCmdContext struct {
	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewFakeRootCmdContext

func NewFakeRootCmdContext(streams genericclioptions.IOStreams) *FakeRootCmdContext

func (*FakeRootCmdContext) GetClient

func (rc *FakeRootCmdContext) GetClient(cmd *cobra.Command) (client.Client, error)

GetClient - return a controller runtime client that supports the schemes used by the CLI

func (*FakeRootCmdContext) GetDiscoveryClient added in v1.5.6

func (rc *FakeRootCmdContext) GetDiscoveryClient(cmd *cobra.Command) (discovery.DiscoveryInterface, error)

func (*FakeRootCmdContext) GetDynamicClient

func (rc *FakeRootCmdContext) GetDynamicClient(cmd *cobra.Command) (dynamic.Interface, error)

GetDynamicClient - return a dynamic client for use with the fake go-client

func (*FakeRootCmdContext) GetErrorStream

func (rc *FakeRootCmdContext) GetErrorStream() io.Writer

GetErrorStream - return the error stream

func (*FakeRootCmdContext) GetHTTPClient

func (rc *FakeRootCmdContext) GetHTTPClient() *http.Client

GetHTTPClient - return an HTTP client for testing that always responds with a 200 and a pre-defined list of releases

func (*FakeRootCmdContext) GetInputStream

func (rc *FakeRootCmdContext) GetInputStream() io.Reader

GetInputStream - return the input stream

func (*FakeRootCmdContext) GetKubeClient

func (rc *FakeRootCmdContext) GetKubeClient(cmd *cobra.Command) (kubernetes.Interface, error)

GetKubeClient - return a Kubernetes clientset for use with the fake go-client

func (*FakeRootCmdContext) GetOutputStream

func (rc *FakeRootCmdContext) GetOutputStream() io.Writer

GetOutputStream - return the output stream

func (*FakeRootCmdContext) SetClient

func (rc *FakeRootCmdContext) SetClient(client client.Client)

SetClient - set the client

func (*FakeRootCmdContext) SetDynamicClient added in v1.6.1

func (rc *FakeRootCmdContext) SetDynamicClient(dynClient dynamic.Interface)

SetDynamicClient - set a dynamic client for use with the fake go-client (used for testing)

func (*FakeRootCmdContext) VerifyCLIArgsNil added in v1.7.0

func (rc *FakeRootCmdContext) VerifyCLIArgsNil(cmd *cobra.Command) error

type RoundTripFunc

type RoundTripFunc func(req *http.Request) *http.Response

RoundTripFunc - define the type for the Transport function

func (RoundTripFunc) RoundTrip

func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip - define the implementation for the Transport function

Jump to

Keyboard shortcuts

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