kubernetes.e2e_test.test_informer module

class kubernetes.e2e_test.test_informer.TestSharedInformerE2E(methodName='runTest')

Bases: TestCase

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

test_added_event_and_cache_entry()

Creating a ConfigMap fires ADDED and the object appears in the cache.

test_cache_populated_after_start()

Pre-existing ConfigMaps appear in the cache once the informer starts.

test_deleted_event_removes_from_cache()

Deleting a ConfigMap fires DELETED and removes it from the cache.

test_modified_event_and_cache_refresh()

Patching a ConfigMap fires MODIFIED and the cache holds the updated object.

test_resource_version_advances()

The stored resourceVersion advances after watch events are received.

test_resync_fires_modified_for_existing_objects()

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.