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

Function newFoo

controller_test.go:73–85  ·  view source on GitHub ↗
(name string, replicas *int32)

Source from the content-addressed store, hash-verified

71}
72
73func newFoo(name string, replicas *int32) *samplecontroller.Foo {
74 return &samplecontroller.Foo{
75 TypeMeta: metav1.TypeMeta{APIVersion: samplecontroller.SchemeGroupVersion.String()},
76 ObjectMeta: metav1.ObjectMeta{
77 Name: name,
78 Namespace: metav1.NamespaceDefault,
79 },
80 Spec: samplecontroller.FooSpec{
81 DeploymentName: fmt.Sprintf("%s-deployment", name),
82 Replicas: replicas,
83 },
84 }
85}
86
87func (f *fixture) newController(ctx context.Context) (*Controller, informers.SharedInformerFactory, kubeinformers.SharedInformerFactory) {
88 f.client = fake.NewClientset(f.objects...)

Callers 4

TestCreatesDeploymentFunction · 0.85
TestDoNothingFunction · 0.85
TestUpdateDeploymentFunction · 0.85
TestNotControlledByUsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…