Robust testing for prometheus metrics in Agent and Controller #799
Labels
area/test/e2e
Issues or PRs related to Antrea specific end-to-end testing.
area/test
Issues or PRs related to unit and integration tests.
enhancement
New feature or request
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
Describe the problem/challenge you have
Extend the existing e2e test or add new unit/integration tests if possible to check on the accuracy of metrics values.
Describe the solution you'd like
Currently, prometheus metrics are relying on manual tests. E2e test covers only whether metrics are available in output or not. The values of metrics should be checked for accuracy.
One possibility: testSetup in Prometheus e2e test can be extended to deploy/delete pods, create/delete network policies etc. At least metrics such as network policy, pod count can be covered. In addition, we may also antctl (tests/e2e/antctl_test) to get the expected values from the agent/controller to compare with metrics gathered by API.
Antrea agent metrics
Antrea Controller Metrics
Anything else you would like to add?
Testing is necessary to get the code right and will be easily maintainable if there are any future changes in existing code; it can be in non-metrics code as well that metrics depend on.
Preference is to add these as integration/unit tests, but not as a new e2e test.
The text was updated successfully, but these errors were encountered: