From 2ed4e9cf9b6acb1850e9db6bf11caeb1afcda261 Mon Sep 17 00:00:00 2001 From: Craig MacKenzie Date: Fri, 29 Sep 2023 13:32:23 -0400 Subject: [PATCH] Resolve conflict in unit test. --- libbeat/outputs/elasticsearch/config_test.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libbeat/outputs/elasticsearch/config_test.go b/libbeat/outputs/elasticsearch/config_test.go index 5c191612e661..c0572bcdf783 100644 --- a/libbeat/outputs/elasticsearch/config_test.go +++ b/libbeat/outputs/elasticsearch/config_test.go @@ -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") @@ -114,7 +111,7 @@ 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") @@ -122,8 +119,7 @@ compression_level: 0 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