forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP/not merge: Introduce extra interface for introspection...
In elastic#4378 we briefly discussed how to test the parsing of config parameters. The way ucfg works is that the yaml/json is unpacked into the struct and with the current approach at least two issues can occur: 1.) One can have entries in the config file that are not consumed 2.) One can have members in the struct that are not filled To allow testing proper parsing of a valid configuration file and help users to show what has been passed I introduce a new config option. Instead of forcing this new method for the existing Beater interface, add a new introspection interface... TODO: Is this a sound approach? Shall a list of interfaces be returned? Print them to a file? What about the b.Config? How to add this as a system test? TODO: Don't use go-yaml/yaml but the one used by ucfg?
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters