package
7.4.0+incompatible
Repository: https://github.com/magento-mcom/beats.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
CreateFullEvent builds a full event given the data generated by a 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.
NewPushMetricSet instantiates a new PushMetricSet using the given configuration.
NewPushMetricSetV2 instantiates a new PushMetricSetV2 using the given configuration.
NewPushMetricSetV2WithContext instantiates a new PushMetricSetV2WithContext using the given configuration.
No description provided by the author
NewReportingMetricSetV2 returns a new ReportingMetricSetV2 instance.
NewReportingMetricSetV2Error returns a new ReportingMetricSetV2 instance.
NewReportingMetricSetV2WithContext returns a new ReportingMetricSetV2WithContext instance.
No description provided by the author
ReadDataConfig reads the testdataconfig from a path.
ReportingFetch runs the given reporting metricset and returns all of the events and errors that occur during that period.
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.
RunPushMetricSet run the given push metricset for the specific amount of time 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.
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
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.
No description provided by the author
# Interfaces
Fetcher is an interface implemented by all fetchers for testing purpouses.