k8stest

package
v0.0.0-...-3098c48 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package k8stest provides testing utilities for testing the kubernetes package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

type Fake struct {
	// MinionList is the static list of Minions returned on Discover.
	MinionList kubernetes.MinionList

	// PodInfoMap is a static map of Pods returned on GetPodInfo.
	// Key of map is of format namespace/name.
	PodInfoMap map[string]*kubernetes.PodInfo
}

Fake implements a Kubernetes Service Fake.

func (*Fake) Discover

func (f *Fake) Discover() (kubernetes.MinionList, error)

Discover returns static list of Minions.

func (*Fake) GetPodInfo

func (f *Fake) GetPodInfo(namespace string, name string) (*kubernetes.PodInfo, error)

GetPodInfo returns PodInfo from static map.

type Mock

type Mock struct {
	mock.Mock
}

Mock implements a Kubernetes Service Mock.

func (*Mock) Discover

func (m *Mock) Discover() (lst kubernetes.MinionList, err error)

Discover is a mocked method.

func (*Mock) GetPodInfo

func (m *Mock) GetPodInfo(namespace string, name string) (podInfo *kubernetes.PodInfo, err error)

GetPodInfo is a mocked method.

Jump to

Keyboard shortcuts

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