kubernetes/pkg/controller/certificates/clustertrustbundlepublisher
Patrick Ohly 6bfa727bee client-go testing: fix List+Watch support
5644850607 added support for List+Watch to a fake client-go instance.
However, that support was not quite working yet as seen when analyzing a test
flake:

- List returned early when there were no objects, without adding the
  ResourceVersion. The ResourceVersion should have been "0" instead.
- When encountering "" as ResourceVersion, Watch didn't deliver
  any objects. That was meant to preserve compatibility with clients
  which don't expect objects from a Watch, but the right semantic of
  "" is "Start at most recent", which includes delivering existing
  objects.

Tests which meddle with the List implementation via a reactor (like
clustertrustbundlepublisher) have to be aware that Watch now may
return objects when given an empty ResourceVersion.
2026-01-15 16:08:23 +01:00
..
metrics.go
metrics_test.go
publisher.go apimachinery: Use informer.RunWithContext in various components 2025-12-02 15:02:04 -08:00
publisher_test.go client-go testing: fix List+Watch support 2026-01-15 16:08:23 +01:00