kubetest

package
Version: v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubectlOutput

type KubectlOutput struct {
	Output string
	Err    error
}

type MockKubectlCmd

type MockKubectlCmd struct {
	APIResources  []kube.APIResourceInfo
	Commands      map[string]KubectlOutput
	Events        chan watch.Event
	Version       string
	DynamicClient dynamic.Interface
	APIGroups     []metav1.APIGroup
	// contains filtered or unexported fields
}

func (*MockKubectlCmd) ApplyResource

func (k *MockKubectlCmd) ApplyResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force, validate bool) (string, error)

func (*MockKubectlCmd) ConvertToVersion

func (k *MockKubectlCmd) ConvertToVersion(obj *unstructured.Unstructured, group, version string) (*unstructured.Unstructured, error)

ConvertToVersion converts an unstructured object into the specified group/version

func (*MockKubectlCmd) CreateResource

func (k *MockKubectlCmd) CreateResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, validate bool) (string, error)

func (*MockKubectlCmd) DeleteResource

func (k *MockKubectlCmd) DeleteResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, deleteOptions metav1.DeleteOptions) error

func (*MockKubectlCmd) GetAPIGroups

func (k *MockKubectlCmd) GetAPIGroups(config *rest.Config) ([]metav1.APIGroup, error)

func (*MockKubectlCmd) GetAPIResources

func (k *MockKubectlCmd) GetAPIResources(config *rest.Config, resourceFilter kube.ResourceFilter) ([]kube.APIResourceInfo, error)

func (*MockKubectlCmd) GetLastResourceCommand

func (k *MockKubectlCmd) GetLastResourceCommand(key kube.ResourceKey) string

func (*MockKubectlCmd) GetLastValidate

func (k *MockKubectlCmd) GetLastValidate() bool

func (*MockKubectlCmd) GetResource

func (k *MockKubectlCmd) GetResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string) (*unstructured.Unstructured, error)

func (*MockKubectlCmd) GetServerVersion

func (k *MockKubectlCmd) GetServerVersion(config *rest.Config) (string, error)

func (*MockKubectlCmd) LoadOpenAPISchema

func (k *MockKubectlCmd) LoadOpenAPISchema(config *rest.Config) (openapi.Resources, error)

func (*MockKubectlCmd) ManageResources

func (k *MockKubectlCmd) ManageResources(config *rest.Config, openAPISchema openapi.Resources) (kube.ResourceOperations, func(), error)

func (*MockKubectlCmd) NewDynamicClient

func (k *MockKubectlCmd) NewDynamicClient(config *rest.Config) (dynamic.Interface, error)

func (*MockKubectlCmd) PatchResource

func (k *MockKubectlCmd) PatchResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, patchType types.PatchType, patchBytes []byte, subresources ...string) (*unstructured.Unstructured, error)

func (*MockKubectlCmd) ReplaceResource

func (k *MockKubectlCmd) ReplaceResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force bool) (string, error)

func (*MockKubectlCmd) SetLastResourceCommand

func (k *MockKubectlCmd) SetLastResourceCommand(key kube.ResourceKey, cmd string)

func (*MockKubectlCmd) SetLastValidate

func (k *MockKubectlCmd) SetLastValidate(validate bool)

func (*MockKubectlCmd) SetOnKubectlRun

func (k *MockKubectlCmd) SetOnKubectlRun(onKubectlRun kube.OnKubectlRunFunc)

func (*MockKubectlCmd) UpdateResource

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL