We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08763f8 commit 6a88ad1Copy full SHA for 6a88ad1
pkg/cache/cache_test.go
@@ -274,9 +274,10 @@ var _ = Describe("Informer Cache", func() {
274
275
By("indexing the restartPolicy field of the Pod object before starting")
276
pod := &kcorev1.Pod{}
277
- Expect(informer.IndexField(pod, "spec.restartPolicy", func(obj runtime.Object) []string {
+ indexFunc := func(obj runtime.Object) []string {
278
return []string{string(obj.(*kcorev1.Pod).Spec.RestartPolicy)}
279
- })).ToNot(HaveOccurred())
+ }
280
+ Expect(informer.IndexField(pod, "spec.restartPolicy", indexFunc)).ToNot(HaveOccurred())
281
282
By("running the cache and waiting for it to sync")
283
go func() {
0 commit comments