summaryrefslogtreecommitdiff
path: root/tests/accel-pppd
AgeCommit message (Collapse)Author
2026-08-02metrics: expose session details in JSON outputDenys Fedoryshchenko
Add an opt-in sessions setting for the JSON metrics renderer. Include session identity, addressing, protocol state, interface context, uptime, and traffic counters while keeping Prometheus output aggregate-only. The session list is walked with ses_lock held, so report the accounting counters the session last sampled rather than calling ap_session_read_stats(): that issues a synchronous netlink round trip per session, which would stall session setup and teardown for the duration of a scrape, it writes back into the session while only the read lock is held, and it needs the thread local net of the session's namespace, which the metrics context does not have. Counter freshness therefore follows accounting, which the documentation spells out. Escape malformed UTF-8 in peer supplied strings so a single bad username cannot make the whole document undecodable, and reserve room for the response header in front of the rendered body so a body that can be megabytes is not copied a second time. Document the privacy-sensitive option in both accel-ppp.conf and the man page, and cover the empty session list, the aggregate-only Prometheus output and the response framing in the metrics integration test.
2026-05-14tests: Add metrics module coverageDenys Fedoryshchenko
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2024-11-28tests,ci: disable chap-secrets related tests on alpineSergey V. Lobanov
radius and chap-secrets can't work together due to musl library limiations This patch disables chap-secrets related tests on alpine ref: https://github.com/accel-ppp/accel-ppp/pull/190#issuecomment-2331036461
2024-11-28tests: add ipoe shared + chap-secrets auth, add ipoe+chap-secrets + luaSergey V. Lobanov
2024-09-04tests: add test pppoe session using chap-secrets authSergey V. Lobanov
2024-08-23ci: run tests in alpine vmSergey V. Lobanov
Alpine Linux uses musl libc so now accel-ppp is tested under musl Currently, Alpine Linux doesn't provide a link to the latest stable version so direct link to Alpine 3.20 is used Improved musl support might be used to run on platforms like openwrt without additional patches
2024-08-19tests: add pcre negative cases, improve pcre-related code test coverageSergey V. Lobanov
these test cases will help for pcre2 migration (issue #173)
2022-09-06tests ci: add testing in Qemu (Ubuntu 18.04, 20.04, 22.04, Debian 10,11,12)Sergey V. Lobanov
2022-09-04add tests and ci workflow for running testsSergey V. Lobanov
This commit adds tests (using python3 pytest framework): 1. Test basic accel-cmd commands (show version, show stat, etc) 2. Test ipoe shared session up (dhcpv4) without radius 3. Test pppoe discovery (without PADO delay) 4. Test pppoe discovery (without PADO delay) 5. Test pppoe session up (ipv4) without radius 6. Test vlan creation using vlan-mon (pppoe) These tests require external utils. Please read tests/README.md how to setup environment, how to run the tests and how to generate coverage report Also, run-tests.yml contains step-by-step instruction how to run the tests Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>