testing

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheableObjectTest

func CacheableObjectTest(t *testing.T, e runtime.Encoder)

CacheableObjectTest implements a test that should be run for every runtime.Encoder interface implementation. It checks whether CacheableObject is properly supported by it.

Types

type MockCacheableObject

type MockCacheableObject struct {
	// contains filtered or unexported fields
}

MochCacheableObject is used to test CacheableObject interface. +k8s:deepcopy-gen=false

func (*MockCacheableObject) CacheEncode

func (m *MockCacheableObject) CacheEncode(id runtime.Identifier, encode func(runtime.Object, io.Writer) error, w io.Writer) error

CacheEncode implements runtime.CacheableObject interface.

func (*MockCacheableObject) DeepCopyObject

func (m *MockCacheableObject) DeepCopyObject() runtime.Object

DeepCopyObject implements runtime.Object interface.

func (*MockCacheableObject) GetObject

func (m *MockCacheableObject) GetObject() runtime.Object

GetObject implements runtime.CacheableObject interface.

func (*MockCacheableObject) Marshal

func (*MockCacheableObject) Marshal() ([]byte, error)

Marshal implements proto.Marshaler interface. This is implemented to avoid errors from protobuf serializer.

Jump to

Keyboard shortcuts

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