Cover edge cases in config parser. Add rudimentary View/Filter
tests. Improves test coverage from 44% to 82%.
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
Enable nilness linter in govet.
Plugin-by-plugin rationale:
- plugin/transfer: reuse error instead of shadowing it inside the for
loop by declaring "ret" outside of the loop
- plugin/view: remove redundant err check
- plugin/dnstap: avoid possible nil dereference in error reporting
path in setup test
- plugin/forward: prevent nil deference or empty-slice dereference on
error paths in setup test
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
* Upgrade antonmedv/expr to expr-lang/expr
The project has moved. This also upgrades from 1.15.5 to 1.16.9.
The expr project lacks a changelog but tests pass and the changes don't
seem to change it much - but there were a lot of changes.
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
* Upgrade build image
In reviewing the build results I see the old build image was deprecated so
upgrading to something newer.
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
---------
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
* introduce new interface "dnsserver.Viewer", that allows a plugin implementing it to decide if a query should be routed into its server block.
* add new plugin "view", that uses the new interface to enable a user to define expression based conditions that must be met for a query to be routed to its server block.
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>