11 Commits

Author SHA1 Message Date
ionutboangiu
8443af3a89 Relicense from GPLv3 to AGPLv3 2025-10-29 19:42:40 +01:00
armirveliaj
8e23794576 Revise unit tests
prevent panic for xmldp unit test
sort slice before comparing in radiuscfg unit test
2024-05-16 16:28:21 +02:00
armirveliaj
ff0bca41f3 Add coverage test 2024-05-12 13:11:02 +02:00
ionutboangiu
7cc5dfb26d Update test for XmlProvider String() func 2023-10-17 17:40:43 +02:00
ionutboangiu
6c41ebe0de Add sanity check to prevent xml reader panic
HierarchyPath parser now returns nil when
the path is empty (instead of a string slice with one
EmptyString element).

If the prefix is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. This avoids a nil expr error coming from
the xmlquery library.

Use the Query and QueryAll functions from the xmlquery
package to be able to handle the errors ourselves and
avoid panics.

Remove config default value for xml_root_path. The field
will remain commented in config_defaults for reference.

Add tests for HierarchyPath.AsString function.

Add comments for XmlProvider and xml_root_path opt.
2023-10-16 13:18:12 +03:00
Trial97
faf1fba125 Refactored EventRequest 2021-07-06 20:52:40 +02:00
Trial97
c539800acd Added more Clone functions for config sections 2020-11-27 08:41:56 +01:00
porosnicuadrian
d7d40ffba0 Covered xmldp.go to 100% 2020-11-12 17:58:13 +01:00
TeoV
f74df27ddd Remove pathPrfx from xmlDP 2020-01-23 10:56:30 +02:00
adragusin
3a1104ff01 Removed directions from templates 2020-01-21 13:36:07 +02:00
TeoV
4ea9cd3a48 Add XML to EventReader and test for it 2020-01-11 14:52:37 +02:00