kubernetes.e2e_test.test_informer module¶
Bases:
TestCaseHook method for setting up class fixture before running tests in the class.
Creating a ConfigMap fires ADDED and the object appears in the cache.
Pre-existing ConfigMaps appear in the cache once the informer starts.
Deleting a ConfigMap fires DELETED and removes it from the cache.
Patching a ConfigMap fires MODIFIED and the cache holds the updated object.
The stored resourceVersion advances after watch events are received.
Periodic resync re-lists from the API server and fires MODIFIED for cached objects.
A short resync_period (5 s) is used so the test completes quickly. After the informer has cached the ConfigMap via the initial list, we wait for a MODIFIED event that is fired by the resync, verifying that the resync actually contacts the API server and triggers callbacks.