(t *testing.T)
| 195 | } |
| 196 | |
| 197 | func TestReflectorStopWatch(t *testing.T) { |
| 198 | s := NewStore(MetaNamespaceKeyFunc) |
| 199 | g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) |
| 200 | fw := watch.NewFake() |
| 201 | var resumeRV string |
| 202 | stopWatch := make(chan struct{}, 1) |
| 203 | stopWatch <- struct{}{} |
| 204 | err := g.watchHandler(fw, &resumeRV, nevererrc, stopWatch) |
| 205 | if err != errorStopRequested { |
| 206 | t.Errorf("expected stop error, got %q", err) |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | func TestReflectorListAndWatch(t *testing.T) { |
| 211 | createdFakes := make(chan *watch.FakeWatcher) |
nothing calls this directly
no test coverage detected