-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
daemon: Add identity reference count testing
Add a new unit test that tests the integration between the daemon DNS event handling logic and the core FQDN and policy (selector) subsystems. The core idea here is to validate that when DNS events are handled that associate FQDNs to IPs, ensure that the reference counting on CIDR identities remains sane. To this end, we put a mock identity reference counter into the Daemon (using pkg/counter), then trigger DNS events to occur. By exercising this core Daemon / FQDN / selector code with our own "known-good" reference counting identity allocator backend, we can check that the intermediate code is appropriately balancing the identity allocation and release. The resulting test ensures that even if we trigger DNS events multiple times, the core agent code should not leak identity references. Signed-off-by: Joe Stringer <joe@cilium.io>
- Loading branch information
1 parent
de10e82
commit 7e1056d
Showing
1 changed file
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters