kubernetes: k8s.io/kubernetes/pkg/kubectl/cmd/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/kubectl/cmd/testing"

Index

Package Files

fake.go util.go zz_generated.deepcopy.go

Variables

var InternalGV = schema.GroupVersion{Group: "apitest", Version: runtime.APIVersionInternal}

InternalGV is the internal group version object

var UnlikelyGV = schema.GroupVersion{Group: "apitest", Version: "unlikelyversion"}

UnlikelyGV is a group version object for unrecognised version

var ValidVersion = "v1"

ValidVersion of API

var ValidVersionGV = schema.GroupVersion{Group: "apitest", Version: ValidVersion}

ValidVersionGV is the valid group version object

func AddToScheme Uses

func AddToScheme(scheme *runtime.Scheme) (meta.RESTMapper, runtime.Codec)

AddToScheme adds required objects into scheme

func BytesBody Uses

func BytesBody(bodyBytes []byte) io.ReadCloser

func DefaultClientConfig Uses

func DefaultClientConfig() *restclient.Config

func DefaultHeader Uses

func DefaultHeader() http.Header

func EmptyTestData Uses

func EmptyTestData() (*corev1.PodList, *corev1.ServiceList, *corev1.ReplicationControllerList)

EmptyTestData returns no pod, service, or replication controller

func GenResponseWithJsonEncodedBody Uses

func GenResponseWithJsonEncodedBody(bodyStruct interface{}) (*http.Response, error)

func InitTestErrorHandler Uses

func InitTestErrorHandler(t *testing.T)

func NewExternalScheme Uses

func NewExternalScheme() (*runtime.Scheme, meta.RESTMapper, runtime.Codec)

NewExternalScheme returns required objects for ExternalScheme

func ObjBody Uses

func ObjBody(codec runtime.Codec, obj runtime.Object) io.ReadCloser

func StringBody Uses

func StringBody(body string) io.ReadCloser

func TestData Uses

func TestData() (*corev1.PodList, *corev1.ServiceList, *corev1.ReplicationControllerList)

type ExternalNamespacedType Uses

type ExternalNamespacedType struct {
    Kind       string `json:"kind"`
    APIVersion string `json:"apiVersion"`

    Name      string `json:"name"`
    Namespace string `json:"namespace"`
}

ExternalNamespacedType schema for external namespaced types +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ExternalNamespacedType) DeepCopy Uses

func (in *ExternalNamespacedType) DeepCopy() *ExternalNamespacedType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalNamespacedType.

func (*ExternalNamespacedType) DeepCopyInto Uses

func (in *ExternalNamespacedType) DeepCopyInto(out *ExternalNamespacedType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalNamespacedType) DeepCopyObject Uses

func (in *ExternalNamespacedType) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalNamespacedType) GetObjectKind Uses

func (obj *ExternalNamespacedType) GetObjectKind() schema.ObjectKind

GetObjectKind returns the ObjectKind schema

func (*ExternalNamespacedType) GroupVersionKind Uses

func (obj *ExternalNamespacedType) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns the GroupVersionKind schema

func (*ExternalNamespacedType) SetGroupVersionKind Uses

func (obj *ExternalNamespacedType) SetGroupVersionKind(gvk schema.GroupVersionKind)

SetGroupVersionKind sets the API version and kind from schema

type ExternalNamespacedType2 Uses

type ExternalNamespacedType2 struct {
    Kind       string `json:"kind"`
    APIVersion string `json:"apiVersion"`

    Name      string `json:"name"`
    Namespace string `json:"namespace"`
}

ExternalNamespacedType2 schema for external namespaced types +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ExternalNamespacedType2) DeepCopy Uses

func (in *ExternalNamespacedType2) DeepCopy() *ExternalNamespacedType2

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalNamespacedType2.

func (*ExternalNamespacedType2) DeepCopyInto Uses

func (in *ExternalNamespacedType2) DeepCopyInto(out *ExternalNamespacedType2)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalNamespacedType2) DeepCopyObject Uses

func (in *ExternalNamespacedType2) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalNamespacedType2) GetObjectKind Uses

func (obj *ExternalNamespacedType2) GetObjectKind() schema.ObjectKind

GetObjectKind returns the ObjectKind schema

func (*ExternalNamespacedType2) GroupVersionKind Uses

func (obj *ExternalNamespacedType2) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns the GroupVersionKind schema

func (*ExternalNamespacedType2) SetGroupVersionKind Uses

func (obj *ExternalNamespacedType2) SetGroupVersionKind(gvk schema.GroupVersionKind)

SetGroupVersionKind sets the API version and kind from schema

type ExternalType Uses

type ExternalType struct {
    Kind       string `json:"kind"`
    APIVersion string `json:"apiVersion"`

    Name string `json:"name"`
}

ExternalType is the schema for external type +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ExternalType) DeepCopy Uses

func (in *ExternalType) DeepCopy() *ExternalType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalType.

func (*ExternalType) DeepCopyInto Uses

func (in *ExternalType) DeepCopyInto(out *ExternalType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalType) DeepCopyObject Uses

func (in *ExternalType) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalType) GetObjectKind Uses

func (obj *ExternalType) GetObjectKind() schema.ObjectKind

GetObjectKind returns the ObjectKind schema

func (*ExternalType) GroupVersionKind Uses

func (obj *ExternalType) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns the GroupVersionKind schema

func (*ExternalType) SetGroupVersionKind Uses

func (obj *ExternalType) SetGroupVersionKind(gvk schema.GroupVersionKind)

SetGroupVersionKind returns the GroupVersionKind schema

type ExternalType2 Uses

type ExternalType2 struct {
    Kind       string `json:"kind"`
    APIVersion string `json:"apiVersion"`

    Name string `json:"name"`
}

ExternalType2 is another schema for external type +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ExternalType2) DeepCopy Uses

func (in *ExternalType2) DeepCopy() *ExternalType2

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalType2.

func (*ExternalType2) DeepCopyInto Uses

func (in *ExternalType2) DeepCopyInto(out *ExternalType2)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExternalType2) DeepCopyObject Uses

func (in *ExternalType2) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ExternalType2) GetObjectKind Uses

func (obj *ExternalType2) GetObjectKind() schema.ObjectKind

GetObjectKind returns the ObjectKind schema

func (*ExternalType2) GroupVersionKind Uses

func (obj *ExternalType2) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns the FromAPIVersionAndKind schema

func (*ExternalType2) SetGroupVersionKind Uses

func (obj *ExternalType2) SetGroupVersionKind(gvk schema.GroupVersionKind)

SetGroupVersionKind sets the API version and obj kind from schema

type InternalNamespacedType Uses

type InternalNamespacedType struct {
    Kind       string
    APIVersion string

    Name      string
    Namespace string
}

InternalNamespacedType schema for internal namespaced types +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func NewInternalNamespacedType Uses

func NewInternalNamespacedType(kind, apiversion, name, namespace string) *InternalNamespacedType

NewInternalNamespacedType returns an initialized instance of InternalNamespacedType

func (*InternalNamespacedType) DeepCopy Uses

func (in *InternalNamespacedType) DeepCopy() *InternalNamespacedType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalNamespacedType.

func (*InternalNamespacedType) DeepCopyInto Uses

func (in *InternalNamespacedType) DeepCopyInto(out *InternalNamespacedType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InternalNamespacedType) DeepCopyObject Uses

func (in *InternalNamespacedType) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*InternalNamespacedType) GetObjectKind Uses

func (obj *InternalNamespacedType) GetObjectKind() schema.ObjectKind

GetObjectKind returns the ObjectKind schema

func (*InternalNamespacedType) GroupVersionKind Uses

func (obj *InternalNamespacedType) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns the GroupVersionKind schema

func (*InternalNamespacedType) SetGroupVersionKind Uses

func (obj *InternalNamespacedType) SetGroupVersionKind(gvk schema.GroupVersionKind)

SetGroupVersionKind sets the API group and kind from schema

type InternalType Uses

type InternalType struct {
    Kind       string
    APIVersion string

    Name string
}

InternalType is the schema for internal type +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func NewInternalType Uses

func NewInternalType(kind, apiversion, name string) *InternalType

NewInternalType returns an initialized InternalType instance

func (*InternalType) DeepCopy Uses

func (in *InternalType) DeepCopy() *InternalType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalType.

func (*InternalType) DeepCopyInto Uses

func (in *InternalType) DeepCopyInto(out *InternalType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InternalType) DeepCopyObject Uses

func (in *InternalType) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*InternalType) GetObjectKind Uses

func (obj *InternalType) GetObjectKind() schema.ObjectKind

GetObjectKind returns the ObjectKind schema

func (*InternalType) GroupVersionKind Uses

func (obj *InternalType) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns GroupVersionKind schema

func (*InternalType) SetGroupVersionKind Uses

func (obj *InternalType) SetGroupVersionKind(gvk schema.GroupVersionKind)

SetGroupVersionKind sets the version and kind

type TestFactory Uses

type TestFactory struct {
    cmdutil.Factory

    Client             kubectl.RESTClient
    ScaleGetter        scaleclient.ScalesGetter
    UnstructuredClient kubectl.RESTClient
    ClientConfigVal    *restclient.Config
    FakeDynamicClient  *fakedynamic.FakeDynamicClient

    UnstructuredClientForMappingFunc resource.FakeClientFunc
    OpenAPISchemaFunc                func() (openapi.Resources, error)
    // contains filtered or unexported fields
}

TestFactory extends cmdutil.Factory

func NewTestFactory Uses

func NewTestFactory() *TestFactory

NewTestFactory returns an initialized TestFactory instance

func (*TestFactory) Cleanup Uses

func (f *TestFactory) Cleanup()

Cleanup cleans up TestFactory temp config file

func (*TestFactory) ClientForMapping Uses

func (f *TestFactory) ClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error)

ClientForMapping is used to Client from a TestFactory

func (*TestFactory) DiscoveryClient Uses

func (f *TestFactory) DiscoveryClient() (discovery.CachedDiscoveryInterface, error)

DiscoveryClient returns a discovery client from TestFactory

func (*TestFactory) DynamicClient Uses

func (f *TestFactory) DynamicClient() (dynamic.Interface, error)

DynamicClient returns a dynamic client from TestFactory

func (*TestFactory) KubernetesClientSet Uses

func (f *TestFactory) KubernetesClientSet() (*kubernetes.Clientset, error)

KubernetesClientSet initializes and returns the Clientset using TestFactory

func (*TestFactory) NewBuilder Uses

func (f *TestFactory) NewBuilder() *resource.Builder

NewBuilder returns an initialized resource.Builder instance

func (*TestFactory) OpenAPISchema Uses

func (f *TestFactory) OpenAPISchema() (openapi.Resources, error)

OpenAPISchema returns openapi resources

func (*TestFactory) RESTClient Uses

func (f *TestFactory) RESTClient() (*restclient.RESTClient, error)

RESTClient returns a REST client from TestFactory

func (*TestFactory) ScaleClient Uses

func (f *TestFactory) ScaleClient() (scaleclient.ScalesGetter, error)

ScaleClient returns the ScalesGetter from a TestFactory

func (*TestFactory) ToRESTConfig Uses

func (f *TestFactory) ToRESTConfig() (*restclient.Config, error)

ToRESTConfig is used to get ClientConfigVal from a TestFactory

func (*TestFactory) UnstructuredClientForMapping Uses

func (f *TestFactory) UnstructuredClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error)

UnstructuredClientForMapping is used to get UnstructuredClient from a TestFactory

func (*TestFactory) Validator Uses

func (f *TestFactory) Validator(validate bool) (validation.Schema, error)

Validator returns a validation schema

func (*TestFactory) WithNamespace Uses

func (f *TestFactory) WithNamespace(ns string) *TestFactory

WithNamespace is used to mention namespace reactively

Package testing imports 37 packages (graph). Updated 2019-07-21. Refresh now. Tools for package owners.