# Functions
CreateFullEvent builds a full event given the data generated by a MetricSet.
GetCapturingPushReporterV2 is a factory for a capturing push metricset.
NewEventFetcher instantiates a new EventFetcher using the given configuration.
NewEventsFetcher instantiates a new EventsFetcher using the given configuration.
NewFetcher returns a test fetcher from a Metricset configuration.
NewMetricSet instantiates a new MetricSet using the given configuration.
NewMetricSets instantiates a list of new MetricSets using the given module configuration.
NewPushMetricSetV2 instantiates a new PushMetricSetV2 using the given configuration.
NewPushMetricSetV2WithContext instantiates a new PushMetricSetV2WithContext using the given configuration.
NewReportingMetricSetV2 returns a new ReportingMetricSetV2 instance.
NewReportingMetricSetV2Error returns a new ReportingMetricSetV2 instance.
NewReportingMetricSetV2Errors returns an array of new ReportingMetricSetV2 instances.
NewReportingMetricSetV2WithContext returns a new ReportingMetricSetV2WithContext instance.
PeriodicReportingFetchV2Error runs the given metricset and returns the first batch of events or errors that occur during that period.
ReadDataConfig reads the testdataconfig from a path.
ReportingFetchV2 runs the given reporting metricset and returns all of the events and errors that occur during that period.
ReportingFetchV2Error runs the given reporting metricset and returns all of the events and errors that occur during that period.
ReportingFetchV2WithContext runs the given reporting metricset and returns all of the events and errors that occur during that period.
RunPushMetricSetV2 run the given push metricset for the specific amount of time and returns all of the events and errors that occur during that period.
RunPushMetricSetV2WithContext run the given push metricset for the specific amount of time and returns all of the events that occur during that period.
SelectEvent selects the first event that matches an specific condition.
SelectEventV2 selects the first event that matches an specific condition.
StandardizeEvent builds a beat.Event given the data generated by a MetricSet.
TestDataConfig is a convenience helper function to read the testdata config from the usual path.
TestDataFiles run tests with config from the usual path (`_meta/testdata`).
TestDataFilesWithConfig run tests for a testdata config.
TestMetricsetFieldsDocumented checks metricset fields are documented from metricsets that cannot run `TestDataFiles` test which contains this check.
WriteEvent fetches a single event writes the output to a ./_meta/data.json file.
WriteEvents fetches events and writes the first event to a ./_meta/data.json file.
WriteEventsCond fetches events and writes the first event that matches the condition to a ./_meta/data.json file.
WriteEventsReporterV2 fetches events and writes the first event to a ./_meta/data.json file.
WriteEventsReporterV2Cond fetches events and writes the first event that matches the condition to a file.
WriteEventsReporterV2Error fetches events and writes the first event to a ./_meta/data.json file.
WriteEventsReporterV2ErrorCond fetches events and writes the first event that matches the condition to a file.
WriteEventsReporterV2WithContext fetches events and writes the first event to a ./_meta/data.json file.
WriteEventsReporterV2WithContextCond fetches events and writes the first event that matches the condition to a file.
WriteEventToDataJSON writes the given event as "pretty" JSON to a ./_meta/data.json file.
# Structs
CapturingPushReporterV2 stores all the events and errors from a metricset's Run method.
CapturingReporterV2 is a reporter used for testing which stores all events and errors.
DataConfig is the configuration for testdata tests
For example for an http service that mimics the apache status page the following configuration could be used: ``` type: http url: "/server-status?auto=" suffix: plain omit_documented_fields_check: - "apache.status.hostname"
remove_fields_from_comparison: - "apache.status.hostname" module:
namespace: test
``` A test will be run for each file with the `plain` extension in the same directory where a file with this configuration is placed.
# Interfaces
Fetcher is an interface implemented by all fetchers for testing purpouses.