Commit graph

6 commits

Author SHA1 Message Date
Copilot
bda3c861b9
Add comprehensive unit tests for Python SDK and additional Lua ts_common tests (#10227)
- 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>
2026-05-10 22:22:58 +02:00
Matteo Biscosi
1c1c7e8ffc Removed unused test files 2025-04-29 11:02:36 +02:00
Simone Mainardi
0f5340e1a3 (C) update 2021-05-31 12:39:02 +02:00
emanuele-f
f31451d0bb Add test to avoid RRD overlapping paths 2019-05-14 20:38:44 +02:00
emanuele-f
12e2e500b1 Implement InfluxDB query test 2018-11-09 12:11:15 +01:00
emanuele-f
186fad5b09 Move regression and other tests to separate directory 2018-08-09 15:50:04 +02:00