Skip to content

Commit

Permalink
Update unit tests for config
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Jan 17, 2024
1 parent 30ca34a commit 5d37b81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions exporter/elasticsearchexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ func TestLoadConfig(t *testing.T) {
MaxInterval: 1 * time.Minute,
},
Mapping: MappingsSettings{
Mode: "ecs",
Dedup: true,
Dedot: true,
Mode: "ecs",
Dedup: true,
Dedot: true,
OmitAttributesPrefix: false,
},
LogstashFormat: LogstashFormatSettings{
Enabled: false,
Expand Down Expand Up @@ -184,9 +185,10 @@ func TestLoadConfig(t *testing.T) {
MaxInterval: 1 * time.Minute,
},
Mapping: MappingsSettings{
Mode: "ecs",
Dedup: true,
Dedot: true,
Mode: "ecs",
Dedup: true,
Dedot: true,
OmitAttributesPrefix: true,
},
LogstashFormat: LogstashFormatSettings{
Enabled: false,
Expand Down
2 changes: 2 additions & 0 deletions exporter/elasticsearchexporter/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ elasticsearch/log:
max_requests: 5
sending_queue:
enabled: true
mapping:
omit_attributes_prefix: true
elasticsearch/logstash_format:
endpoints: [http://localhost:9200]
logstash_format:
Expand Down

0 comments on commit 5d37b81

Please sign in to comment.