Documentation ¶
Overview ¶
Package testutils contains shared functionality for unit tests which are not included in build artifacts
Index ¶
- func NewConfigMap(name string, namespace string) *coreV1.ConfigMap
- func NewDeployment(name string, namespace string) *appsV1.Deployment
- func NewFakeDynamic(objs ...runtime.Object) (*dynamicfake.FakeDynamicClient, error)
- func NewIngress(name string, namespace string) *networkV1.Ingress
- func NewJob(name string, namespace string) *batchv1.Job
- func NewJobWithStatus(name string, namespace string, status string) *batchv1.Job
- func NewNamespace(name string) *coreV1.Namespace
- func NewNodes(name string) *coreV1.Node
- func NewPersistentVolume(name string) *coreV1.PersistentVolume
- func NewPersistentVolumeClaim(name string, namespace string) *coreV1.PersistentVolumeClaim
- func NewPod(name string, namespace string) *coreV1.Pod
- func NewPodWithStatus(name string, namespace string, phase string) *coreV1.Pod
- func NewSecret(name string, namespace string) *coreV1.Secret
- func NewService(name string, namespace string) *coreV1.Service
- func PodWithEphemeralContainerStatus(name string, namespace string, container string, state string) *coreV1.Pod
- type FakeRESTMapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigMap ¶
NewConfigMap creates a basic ConfigMap instance having the provided namespace and name
func NewDeployment ¶
func NewDeployment(name string, namespace string) *appsV1.Deployment
NewDeployment is a helper to build a new Deployment instance
func NewFakeDynamic ¶
func NewFakeDynamic(objs ...runtime.Object) (*dynamicfake.FakeDynamicClient, error)
NewFakeDynamic creates a new instance of a fake dynamic client with a default scheme
func NewIngress ¶
NewIngress is a helper to build a new Ingress instance
func NewJobWithStatus ¶
NewJobWithStatus creates a job with a given condition
func NewNamespace ¶
NewNamespace is a helper to build a new Namespace instance
func NewPersistentVolume ¶
func NewPersistentVolume(name string) *coreV1.PersistentVolume
NewPersistentVolume is a helper to build a new PersistentVolume instance
func NewPersistentVolumeClaim ¶
func NewPersistentVolumeClaim(name string, namespace string) *coreV1.PersistentVolumeClaim
NewPersistentVolumeClaim is a helper to build a new PersistentVolumeClaim instance
func NewPodWithStatus ¶
NewPodWithStatus is a helper for building Pods with a given Status
func NewService ¶
NewService is a helper to build a new Service instance
Types ¶
type FakeRESTMapper ¶ added in v0.0.5
type FakeRESTMapper struct {
meta.RESTMapper
}
func (*FakeRESTMapper) RESTMapping ¶ added in v0.0.5
func (f *FakeRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)