Documentation ¶
Index ¶
- func AssertPrivateRegistryEnvVars(t *testing.T, client client.Client, deployment *appsv1.Deployment, ...)
- func AssertPrivateRegistryImage(t *testing.T, client client.Client, deployment *appsv1.Deployment, ...)
- func CleanUpNewFakeRootCmdContextWithFiles(context *FakeRootCmdContextWithFiles)
- func CreateTestVPOObjects() []client.Object
- func CreateVPOPod(name string) client.Object
- func CreateVPOReplicaset(name string) client.Object
- func CreateVerrazzanoObject() client.Object
- func CreateVerrazzanoObjectWithVersion() client.Object
- func VerifyLastAppliedConfigAnnotation(t *testing.T, object v1.ObjectMeta, expectedLastAppliedConfigAnnotation string)
- type FakeRootCmdContext
- func (rc *FakeRootCmdContext) GetClient(cmd *cobra.Command) (client.Client, error)
- func (rc *FakeRootCmdContext) GetDiscoveryClient(cmd *cobra.Command) (discovery.DiscoveryInterface, error)
- func (rc *FakeRootCmdContext) GetDynamicClient(cmd *cobra.Command) (dynamic.Interface, error)
- func (rc *FakeRootCmdContext) GetErrorStream() io.Writer
- func (rc *FakeRootCmdContext) GetHTTPClient() *http.Client
- func (rc *FakeRootCmdContext) GetInputStream() io.Reader
- func (rc *FakeRootCmdContext) GetKubeClient(cmd *cobra.Command) (kubernetes.Interface, error)
- func (rc *FakeRootCmdContext) GetOutputStream() io.Writer
- func (rc *FakeRootCmdContext) SetClient(client client.Client)
- func (rc *FakeRootCmdContext) SetDynamicClient(dynClient dynamic.Interface)
- func (rc *FakeRootCmdContext) SetKubeClient(kubeClient kubernetes.Interface)
- func (rc *FakeRootCmdContext) VerifyCLIArgsNil(cmd *cobra.Command) error
- type FakeRootCmdContextWithFiles
- type RoundTripFunc
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 CleanUpNewFakeRootCmdContextWithFiles ¶ added in v1.6.11
func CleanUpNewFakeRootCmdContextWithFiles(context *FakeRootCmdContextWithFiles)
CleanUpFakeRootCmdContextWithFiles removes the standard out and standard error files from the local file system
func CreateTestVPOObjects ¶
func CreateVPOPod ¶
func CreateVPOReplicaset ¶
func CreateVerrazzanoObject ¶
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 ¶
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 ¶
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) SetKubeClient ¶ added in v1.6.11
func (rc *FakeRootCmdContext) SetKubeClient(kubeClient kubernetes.Interface)
SetKubeClient - set the kubeclient
func (*FakeRootCmdContext) VerifyCLIArgsNil ¶ added in v1.6.11
func (rc *FakeRootCmdContext) VerifyCLIArgsNil(cmd *cobra.Command) error
type FakeRootCmdContextWithFiles ¶ added in v1.6.11
type FakeRootCmdContextWithFiles struct { FakeRootCmdContext Out *os.File ErrOut *os.File }
func NewFakeRootCmdContextWithFiles ¶ added in v1.6.11
func NewFakeRootCmdContextWithFiles(t *testing.T) *FakeRootCmdContextWithFiles
NewFakeRootCmdContextWithFiles creates a newFakeRootCmdContext with the out stream and the error stream set to two separate files
type RoundTripFunc ¶
RoundTripFunc - define the type for the Transport function