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

Function TestNotControlledByUs

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

Source from the content-addressed store, hash-verified

299}
300
301func TestNotControlledByUs(t *testing.T) {
302 f := newFixture(t)
303 foo := newFoo("test", ptr.To[int32](1))
304 _, ctx := ktesting.NewTestContext(t)
305
306 d := newDeployment(foo)
307
308 d.ObjectMeta.OwnerReferences = []metav1.OwnerReference{}
309
310 f.fooLister = append(f.fooLister, foo)
311 f.objects = append(f.objects, foo)
312 f.deploymentLister = append(f.deploymentLister, d)
313 f.kubeobjects = append(f.kubeobjects, d)
314
315 f.runExpectError(ctx, getRef(foo, t))
316}

Callers

nothing calls this directly

Calls 5

newFixtureFunction · 0.85
newFooFunction · 0.85
newDeploymentFunction · 0.85
getRefFunction · 0.85
runExpectErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…