Documentation ¶
Index ¶
- func RunReactionsAfter(fake *ktesting.Fake, action ktesting.Action) (bool, runtime.Object, error)
- func UpdatePodContainerStatus(pod *apiv1.Pod, running bool)
- type ClientWrapper
- type ClusterInterface
- type KubeMock
- func (s *KubeMock) AppReaction(a provision.App, c *check.C) ktesting.ReactionFunc
- func (s *KubeMock) CRDReaction(c *check.C) ktesting.ReactionFunc
- func (s *KubeMock) CreateDeployReadyServer(c *check.C) (*httptest.Server, *sync.WaitGroup)
- func (s *KubeMock) DefaultReactions(c *check.C) (*provisiontest.FakeApp, func(), func())
- func (s *KubeMock) DeploymentReactions(c *check.C) func()
- func (s *KubeMock) ListPodsHandler(c *check.C, funcs ...func(r *http.Request)) func(w http.ResponseWriter, r *http.Request)
- func (s *KubeMock) MockfakeNodes(c *check.C, urls ...string)
- func (s *KubeMock) NoAppReactions(c *check.C) (func(), func())
- func (s *KubeMock) ServiceWithPortReaction(c *check.C, ports []apiv1.ServicePort) ktesting.ReactionFunc
- type StreamResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunReactionsAfter ¶
RunReactionsAfter is a hack and it MUST be called from inside a reaction function if it modifies the source object and returns false. This code only exists because of the behavior change introduced by DeepCopying objects in https://github.com/kubernetes/kubernetes/pull/60709.
The regression was identified and should be fixed in https://github.com/kubernetes/kubernetes/pull/73601
When the latter PR is merged and we update k8s.io/client-go accordingly this code can be safely removed.
Types ¶
type ClientWrapper ¶
type ClientWrapper struct { *fake.Clientset ApiExtensionsClientset *fakeapiextensions.Clientset TsuruClientset *faketsuru.Clientset ClusterInterface }
func (*ClientWrapper) ApiextensionsV1beta1 ¶
func (c *ClientWrapper) ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface
func (*ClientWrapper) CoreV1 ¶
func (c *ClientWrapper) CoreV1() v1core.CoreV1Interface
func (*ClientWrapper) TsuruV1 ¶
func (c *ClientWrapper) TsuruV1() tsuruv1client.TsuruV1Interface
type ClusterInterface ¶
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 NewKubeMock ¶
func NewKubeMock(cluster *ClientWrapper, p provision.Provisioner, factory informers.SharedInformerFactory) *KubeMock
func (*KubeMock) AppReaction ¶
func (*KubeMock) CRDReaction ¶
func (s *KubeMock) CRDReaction(c *check.C) ktesting.ReactionFunc
func (*KubeMock) CreateDeployReadyServer ¶
func (*KubeMock) DefaultReactions ¶
func (s *KubeMock) DefaultReactions(c *check.C) (*provisiontest.FakeApp, func(), func())
func (*KubeMock) DeploymentReactions ¶
func (*KubeMock) ListPodsHandler ¶
func (*KubeMock) NoAppReactions ¶
func (*KubeMock) ServiceWithPortReaction ¶
func (s *KubeMock) ServiceWithPortReaction(c *check.C, ports []apiv1.ServicePort) ktesting.ReactionFunc
Click to show internal directories.
Click to hide internal directories.