Skip to content

Commit

Permalink
Resolve conflict in unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacknz committed Sep 29, 2023
1 parent f6f64c8 commit 2ed4e9c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions libbeat/outputs/elasticsearch/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,9 @@ non_indexable_policy.dead_letter_index:
}
}

<<<<<<< HEAD
func readConfig(cfg *common.Config) (*elasticsearchConfig, error) {
=======
func TestCompressionIsOnByDefault(t *testing.T) {
config := ""
c := conf.MustNewConfigFrom(config)
c := common.MustNewConfigFrom(config)
elasticsearchOutputConfig, err := readConfig(c)
if err != nil {
t.Fatalf("Can't create test configuration from valid input")
Expand All @@ -114,16 +111,15 @@ func TestExplicitCompressionLevelOverridesDefault(t *testing.T) {
config := `
compression_level: 0
`
c := conf.MustNewConfigFrom(config)
c := common.MustNewConfigFrom(config)
elasticsearchOutputConfig, err := readConfig(c)
if err != nil {
t.Fatalf("Can't create test configuration from valid input")
}
assert.Equal(t, 0, elasticsearchOutputConfig.CompressionLevel, "Explicit compression level should override defaults")
}

func readConfig(cfg *conf.C) (*elasticsearchConfig, error) {
>>>>>>> 231e93a6d2 (Enable compression by default for Elasticsearch outputs (#36681))
func readConfig(cfg *common.Config) (*elasticsearchConfig, error) {
c := defaultConfig
if err := cfg.Unpack(&c); err != nil {
return nil, err
Expand Down

0 comments on commit 2ed4e9c

Please sign in to comment.