mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-26 15:43:56 +00:00
This test wishes to observe a watch event. In order to do this in the past, the test chose a well-known `Service` object, fetched it, and did arithmetic on the returned `resourceVersion` in order to start a watch that was guaranteed to see an event. It is not valid to parse the `resourceVersion` as an integer or to do arithmetic on it, so in order to make the test conformant to an appropriate use of the API it now: - creates a namespace - fetches the current `resourceVersion` - creates an object - watches from the previous `resourceVersion` that was read This ensures that an event is seen by the watch, but uses the publically supported API. `ConfigMap`s are used instead of `Service`s as they do not require a valid `spec` for creation and make the test terser. Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>