testing

package
v0.0.0-...-ebeccf4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetPodContainerReady

func SetPodContainerReady(pod *apiv1.Pod)

func SortNodes

func SortNodes(nodes []*apiv1.Node)

Types

type ClientWrapper

type ClientWrapper struct {
	*fake.Clientset
	ApiExtensionsClientset *fakeapiextensions.Clientset
	TsuruClientset         *faketsuru.Clientset
	MetricsClientset       *fakemetrics.Clientset
	VPAClientset           *fakevpa.Clientset
	BackendClientset       *fakeBackendConfig.Clientset
	KEDAClientForConfig    *fakekedaclientset.Clientset
	ClusterInterface
}

func (*ClientWrapper) ApiextensionsV1

func (*ClientWrapper) CoreV1

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

func (*ClientWrapper) TsuruV1

type ClusterInterface

type ClusterInterface interface {
	CoreV1() v1core.CoreV1Interface
	RestConfig() *rest.Config
	AppNamespace(context.Context, appTypes.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)

	HandleSize    bool
	IgnorePool    bool
	IgnoreAppName bool
	// contains filtered or unexported fields
}

func (*KubeMock) AppReaction

func (s *KubeMock) AppReaction(a provision.App, c *check.C) ktesting.ReactionFunc

func (*KubeMock) CRDReaction

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

func (*KubeMock) CreateDeployReadyServer

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

func (*KubeMock) CronJobReactions

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

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(urls ...string)

func (*KubeMock) NoAppReactions

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

func (*KubeMock) NoNodeReactions

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

func (*KubeMock) ServiceWithPortReaction

func (s *KubeMock) ServiceWithPortReaction(c *check.C, ports []apiv1.ServicePort) ktesting.ReactionFunc

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