MCPcopy Index your code
hub / github.com/kubernetes/sample-controller / TestCreatesDeployment

Function TestCreatesDeployment

controller_test.go:249–262  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

247}
248
249func TestCreatesDeployment(t *testing.T) {
250 f := newFixture(t)
251 foo := newFoo("test", ptr.To[int32](1))
252 _, ctx := ktesting.NewTestContext(t)
253
254 f.fooLister = append(f.fooLister, foo)
255 f.objects = append(f.objects, foo)
256
257 expDeployment := newDeployment(foo)
258 f.expectCreateDeploymentAction(expDeployment)
259 f.expectUpdateFooStatusAction(foo)
260
261 f.run(ctx, getRef(foo, t))
262}
263
264func TestDoNothing(t *testing.T) {
265 f := newFixture(t)

Callers

nothing calls this directly

Calls 7

newFixtureFunction · 0.85
newFooFunction · 0.85
newDeploymentFunction · 0.85
getRefFunction · 0.85
runMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…