Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConfigFileName = "ilogtail-e2e.yaml" DockerComposeFileName = "docker-compose.yaml" )
The user defined configuration files.
Variables ¶
View Source
var ( CaseHome string CaseName string EngineLogFile string ReportFile string PprofDir string ProfileFlag bool CoverageFile string FlusherFile string ConfigDir string LogDir string )
View Source
var DemoCase = Case{ Boot: Boot{ Category: "docker-compose", Timeout: "60s", }, Ilogtail: Ilogtail{ LoadConfigWait: "5s", CloseWait: "5s", Config: []LogtailCfgs{ { Name: "mock-metric-case", Content: []string{ `{"inputs":[{"type":"metric_mock","detail":{"IntervalMs": 1000,"Tags":{"tag1":"aaaa","tag2":"bbb"},"Fields":{"content":"xxxxx","time":"2017.09.12 20:55:36"}}}]}`, }, }, }, MountFiles: []string{}, }, SetUps: []SetUp{}, Retry: Retry{ Times: 0, Interval: "10s", }, Verify: Verify{ LogRules: []Rule{ { Name: "fields-check", Validator: "log_fields", Spec: map[string]interface{}{ "expect_log_fields": []string{"tag1", "tag2", "content", "time"}, }, }, }, SystemRules: []Rule{ { Name: "counter-check", Validator: "sys_counter", Spec: map[string]interface{}{ "expect_equal_raw_log": true, "expect_equal_processed_log": true, "expect_equal_flush_log": true, "expect_received_minimum_log_num": 15, }, }, }, }, TestingInterval: "16s", Subscriber: Subscriber{ Name: "grpc", Config: map[string]interface{}{ "address": ":9000", "network": "tcp", }, }, Trigger: Trigger{ URL: "http://ilogtail:18689/test", Method: "GET", Interval: "1s", Times: 10, }, CoveragePackages: []string{ "ilogtail/pluginmanager", "ilogtail/main", }, }
DemoCase is only for generate ilogtail-e2e-demo.yaml.
Functions ¶
This section is empty.
Types ¶
type Boot ¶
type Boot struct { Category string `mapstructure:"category" yaml:"category"` Timeout string `mapstructure:"timeout" yaml:"timeout"` }
Boot the dependency virtual environment, such as docker compose.
type Case ¶
type Case struct { Boot Boot `mapstructure:"boot" yaml:"boot"` SetUps []SetUp `mapstructure:"setups" yaml:"setups"` Ilogtail Ilogtail `mapstructure:"ilogtail" yaml:"ilogtail"` Subscriber Subscriber `mapstructure:"subscriber" yaml:"subscriber"` Trigger Trigger `mapstructure:"trigger" yaml:"trigger"` Verify Verify `mapstructure:"verify" yaml:"verify"` Retry Retry `mapstructure:"retry" yaml:"retry"` TestingInterval string `mapstructure:"testing_interval" yaml:"testing_interval"` CoveragePackages []string `mapstructure:"coverage_packages" yaml:"coverage_packages"` }
Case declares a procedure for testing a case.
func GetDefaultCase ¶
func GetDefaultCase() *Case
type Ilogtail ¶
type Ilogtail struct { Config []LogtailCfgs `mapstructure:"config" yaml:"config"` LoadConfigWait string `mapstructure:"load_config_wait" yaml:"load_config_wait"` CloseWait string `mapstructure:"close_wait" yaml:"close_wait"` // wait interval for upstream process. ENV map[string]string `mapstructure:"env" yaml:"env"` DependsOn map[string]interface{} `mapstructure:"depends_on" yaml:"depends_on"` MountFiles []string `mapstructure:"mounts" yaml:"mounts"` Ports []string `mapstructure:"ports" yaml:"ports"` }
Ilogtail is the logtail plugin configuration to load the ilogtail context.
type LogtailCfgs ¶
type Retry ¶
type Retry struct { Times int `mapstructure:"times" yaml:"times"` Interval string `mapstructure:"interval" yaml:"interval"` }
Retry triggered when failing.
type SetUp ¶
type SetUp struct { Name string `mapstructure:"name" yaml:"name"` Command string `mapstructure:"command" yaml:"command"` }
SetUp prepares the test environment after the virtual environment started, such as installing some software.
type Subscriber ¶
type Trigger ¶
type Trigger struct { URL string `mapstructure:"url" yaml:"url"` Method string `mapstructure:"method" yaml:"method"` Interval string `mapstructure:"interval" yaml:"interval"` Times int `mapstructure:"times" yaml:"times"` Body string `mapstructure:"body" yaml:"body"` }
Trigger triggers the custom HTTP endpoint to create some telemetry data.
type Verify ¶
type Verify struct { LogRules []Rule `mapstructure:"log_rules" yaml:"log_rules"` TagRules []Rule `mapstructure:"tag_rules" yaml:"tag_rules"` SystemRules []Rule `mapstructure:"system_rules" yaml:"system_rules"` }
Verify content transferred to the mock backend to verify the collected telemetry data.
Click to show internal directories.
Click to hide internal directories.