testing

package
v0.0.0-...-31a1246 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2018 License: BSD-3-Clause Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientWrapper

type ClientWrapper struct {
	*fake.Clientset
	ApiExtensionsClientset *fakeapiextensions.Clientset
	TsuruClientset         *faketsuru.Clientset
	ClusterInterface
}

func (*ClientWrapper) ApiextensionsV1beta1

func (*ClientWrapper) CoreV1

func (c *ClientWrapper) CoreV1() v1core.CoreV1Interface

func (*ClientWrapper) TsuruV1

type ClusterInterface

type ClusterInterface interface {
	CoreV1() v1core.CoreV1Interface
	RestConfig() *rest.Config
	AppNamespace(provision.App) (string, error)
	PoolNamespace(string) string
	Namespace() string
	GetCluster() *provTypes.Cluster
}

type KubeMock

type KubeMock struct {
	Stream      map[string]StreamResult
	LogHook     func(w io.Writer, r *http.Request)
	DefaultHook func(w http.ResponseWriter, r *http.Request)
	// contains filtered or unexported fields
}

func NewKubeMock

func NewKubeMock(cluster *ClientWrapper, p provision.Provisioner) *KubeMock

func (*KubeMock) CRDReaction

func (s *KubeMock) CRDReaction(c *check.C) ktesting.ReactionFunc

func (*KubeMock) CreateDeployReadyServer

func (s *KubeMock) CreateDeployReadyServer(c *check.C) (*httptest.Server, *sync.WaitGroup)

func (*KubeMock) DefaultReactions

func (s *KubeMock) DefaultReactions(c *check.C) (*provisiontest.FakeApp, func(), func())

func (*KubeMock) DeploymentReactions

func (s *KubeMock) DeploymentReactions(c *check.C) func()

func (*KubeMock) ListPodsHandler

func (s *KubeMock) ListPodsHandler(c *check.C, funcs ...func(r *http.Request)) func(w http.ResponseWriter, r *http.Request)

func (*KubeMock) MockfakeNodes

func (s *KubeMock) MockfakeNodes(c *check.C, urls ...string)

func (*KubeMock) NoAppReactions

func (s *KubeMock) NoAppReactions(c *check.C) (func(), func())

type StreamResult

type StreamResult struct {
	Stdin  string
	Resize string
	Urls   []url.URL
}

Jump to

Keyboard shortcuts

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