package testing

import "k8s.io/apimachinery/pkg/util/managedfields/internal/testing"

Index

Functions

func NewFakeObjectCreater

func NewFakeObjectCreater() runtime.ObjectCreater

NewFakeObjectCreater implements ObjectCreater, it can create empty objects (unstructured) of the given GVK.

Types

type TestFieldManagerImpl

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

func NewTestFieldManagerImpl

func NewTestFieldManagerImpl(typeConverter managedfields.TypeConverter, gvk schema.GroupVersionKind, subresource string, chainFieldManager func(internal.Manager) internal.Manager) *TestFieldManagerImpl

NewTestFieldManager creates a new manager for the given GVK.

func (*TestFieldManagerImpl) APIVersion

func (f *TestFieldManagerImpl) APIVersion() string

APIVersion of the object that we're tracking.

func (*TestFieldManagerImpl) Apply

func (f *TestFieldManagerImpl) Apply(obj runtime.Object, manager string, force bool) error

Apply applies the given object on top of the current liveObj, for the given manager and force flag.

func (*TestFieldManagerImpl) Live

Live returns a copy of the current liveObject.

func (*TestFieldManagerImpl) ManagedFields

func (f *TestFieldManagerImpl) ManagedFields() []metav1.ManagedFieldsEntry

ManagedFields returns the list of existing managed fields for the liveObj.

func (*TestFieldManagerImpl) Reset

func (f *TestFieldManagerImpl) Reset()

Reset resets the state of the liveObject by resetting it to an empty object.

func (*TestFieldManagerImpl) Update

func (f *TestFieldManagerImpl) Update(obj runtime.Object, manager string) error

Update will updates the managed fields in the liveObj based on the changes performed by the update.

Source Files

testfieldmanager.go

Version
v0.27.10
Published
Jan 10, 2024
Platform
js/wasm
Imports
12 packages
Last checked
42 minutes ago

Tools for package owners.