mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-17 12:20:30 +00:00
- Add python/tests/test_ntopng_sdk.py with 86 unit tests covering:
- Ntopng: constructor (auth_token / user+pass), request/post_request wrappers,
all getter methods, debug flag, URL building
- Interface: all data, alert, flow, L7/L4 and host methods
- Host: get_host_data, get_l7_stats, get_dscp_stats (both directions), VLAN handling
- Historical: all alert family delegates, timeseries, flows, conversations
- Fix bug in historical.py get_host_top_protocols(): self.ifid (int) was
concatenated with strings without str() conversion, causing TypeError at runtime
- Add scripts/lua/modules/timeseries/tests/ts_common_test.lua with 11 test cases:
- upsampleSerie: no-op when target <= source length, empty serie
- calculateMinMax: basic, single element, NaN-skipping
- calculateStatistics: counter (total*step), gauge+keep_total, gauge no-total, NaN-skipping
- ninetififthPercentile: single element, all-NaN
- Register ts_common_test in the Lua test runner (run.lua)
Agent-Logs-Url: https://github.com/ntop/ntopng/sessions/32da23c3-306c-4100-9bbe-64b91191653b
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lucaderi <4493366+lucaderi@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| __pycache__ | ||
| __init__.py | ||
| test_ntopng_sdk.py | ||