fake

package
v0.37.9 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeTiltClient added in v0.20.9

func NewFakeTiltClient() fakeTiltClient

func NewTestingStore added in v0.23.6

func NewTestingStore(out io.Writer) *testStore

func UpdateStatus added in v0.33.6

func UpdateStatus(ctx context.Context, t testing.TB, ctrlClient ctrlclient.Client, obj ctrlclient.Object)

func UpsertSpec added in v0.33.6

func UpsertSpec(ctx context.Context, t testing.TB, ctrlClient ctrlclient.Client, obj ctrlclient.Object)

Types

type ControllerFixture

type ControllerFixture struct {
	Store  *testStore
	Scheme *runtime.Scheme
	Client ctrlclient.Client
	// contains filtered or unexported fields
}

func (*ControllerFixture) Actions added in v0.27.1

func (f *ControllerFixture) Actions() []store.Action

func (*ControllerFixture) AssertStdOutContains added in v0.28.0

func (f *ControllerFixture) AssertStdOutContains(v string) bool

func (*ControllerFixture) Cancel

func (f *ControllerFixture) Cancel()

Cancel cancels the internal context used for the controller and client requests.

Normally, it's not necessary to call this - the fixture will automatically cancel the context as part of test cleanup to avoid leaking resources. However, if you want to explicitly test how a controller reacts to context cancellation, this method can be used.

func (*ControllerFixture) Context added in v0.20.8

func (f *ControllerFixture) Context() context.Context

func (*ControllerFixture) Create

func (f *ControllerFixture) Create(o object) ctrl.Result

func (*ControllerFixture) Delete

func (f *ControllerFixture) Delete(o object) (bool, ctrl.Result)

func (*ControllerFixture) Get

func (f *ControllerFixture) Get(key types.NamespacedName, out object) bool

func (*ControllerFixture) KeyForObject

func (f *ControllerFixture) KeyForObject(o object) types.NamespacedName

func (*ControllerFixture) List added in v0.20.6

func (*ControllerFixture) MustGet

func (f *ControllerFixture) MustGet(key types.NamespacedName, out object)

func (*ControllerFixture) MustReconcile

func (f *ControllerFixture) MustReconcile(key types.NamespacedName) ctrl.Result

func (*ControllerFixture) Reconcile added in v0.22.14

func (f *ControllerFixture) Reconcile(key types.NamespacedName) (ctrl.Result, error)

func (*ControllerFixture) ReconcileWithErrors added in v0.22.14

func (f *ControllerFixture) ReconcileWithErrors(key types.NamespacedName, expectedErrorSubstrings ...string)

func (*ControllerFixture) Stdout added in v0.22.4

func (b *ControllerFixture) Stdout() string

func (*ControllerFixture) T added in v0.21.0

func (f *ControllerFixture) T() testing.TB

func (*ControllerFixture) Update

func (f *ControllerFixture) Update(o object) ctrl.Result

Update updates the object metadata and spec.

func (*ControllerFixture) UpdateStatus added in v0.22.15

func (f *ControllerFixture) UpdateStatus(o object) ctrl.Result

func (*ControllerFixture) Upsert added in v0.23.0

func (f *ControllerFixture) Upsert(o object) ctrl.Result

Create or update.

type ControllerFixtureBuilder added in v0.20.9

type ControllerFixtureBuilder struct {
	Client ctrlclient.Client
	Store  *testStore
	// contains filtered or unexported fields
}

func NewControllerFixtureBuilder added in v0.20.9

func NewControllerFixtureBuilder(t testing.TB) *ControllerFixtureBuilder

func (*ControllerFixtureBuilder) Analytics added in v0.23.5

func (*ControllerFixtureBuilder) Build added in v0.20.9

func (b *ControllerFixtureBuilder) Build(c controller) *ControllerFixture

func (*ControllerFixtureBuilder) Context added in v0.23.0

func (*ControllerFixtureBuilder) OutWriter added in v0.23.0

func (b *ControllerFixtureBuilder) OutWriter() io.Writer

func (*ControllerFixtureBuilder) Scheme added in v0.23.5

func (*ControllerFixtureBuilder) WithRequeuer added in v0.33.7

func (*ControllerFixtureBuilder) WithRequeuerResultChan added in v0.33.7

type FakeManager added in v0.33.0

type FakeManager struct {
	ctrl.Manager
}

func (*FakeManager) GetCache added in v0.33.0

func (m *FakeManager) GetCache() cache.Cache

type LockedController added in v0.33.7

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

func NewLockedController added in v0.33.7

func NewLockedController(c controller) *LockedController

func (*LockedController) CreateBuilder added in v0.33.7

func (c *LockedController) CreateBuilder(mgr ctrl.Manager) (*builder.Builder, error)

func (*LockedController) Reconcile added in v0.33.7

func (c *LockedController) Reconcile(ctx context.Context, req reconcile.Request) (ctrl.Result, error)

Jump to

Keyboard shortcuts

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