testing

package
v0.0.0-...-c5ab296 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTrackedImage

func GetTrackedImage(i string) *types.TrackedImage

Types

type FakeK8sImplementer

type FakeK8sImplementer struct {
	NamespacesList   *v1.NamespaceList
	DeploymentSingle *apps_v1.Deployment
	DeploymentList   *apps_v1.DeploymentList

	// stores value of an updated deployment
	Updated *k8s.GenericResource

	AvailableSecret map[string]*v1.Secret

	AvailablePods *v1.PodList
	DeletedPods   []*v1.Pod

	// error to return
	Error error
}

FakeK8sImplementer - fake implementer used for testing

func (*FakeK8sImplementer) ConfigMaps

func (i *FakeK8sImplementer) ConfigMaps(namespace string) core_v1.ConfigMapInterface

ConfigMaps - returns nothing (not implemented)

func (*FakeK8sImplementer) DeletePod

func (i *FakeK8sImplementer) DeletePod(namespace, name string, opts *meta_v1.DeleteOptions) error

DeletePod - adds pod to DeletedPods list

func (*FakeK8sImplementer) Deployment

func (i *FakeK8sImplementer) Deployment(namespace, name string) (*apps_v1.Deployment, error)

Deployment - available deployment, doesn't filter anything

func (*FakeK8sImplementer) Deployments

func (i *FakeK8sImplementer) Deployments(namespace string) (*apps_v1.DeploymentList, error)

Deployments - available deployments

func (*FakeK8sImplementer) Namespaces

func (i *FakeK8sImplementer) Namespaces() (*v1.NamespaceList, error)

Namespaces - available namespaces

func (*FakeK8sImplementer) Pods

func (i *FakeK8sImplementer) Pods(namespace, labelSelector string) (*v1.PodList, error)

Pods - available pods

func (*FakeK8sImplementer) Secret

func (i *FakeK8sImplementer) Secret(namespace, name string) (*v1.Secret, error)

Secret - get secret

func (*FakeK8sImplementer) Update

func (i *FakeK8sImplementer) Update(obj *k8s.GenericResource) error

Update - update deployment

Jump to

Keyboard shortcuts

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