Skip to content

Commit

Permalink
elasticsearch: add known unhandled libbeat config (elastic#3800)
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed May 19, 2020
1 parent bdb75f5 commit 25b8195
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion elasticsearch/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package elasticsearch

import (
"fmt"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -143,6 +144,29 @@ func TestBeatsConfigSynced(t *testing.T) {
require.Contains(t, libbeatStructFields, name)
libbeatStructField := libbeatStructFields[name]
assert.Equal(t, localStructField.structTag, libbeatStructField.structTag)
assert.Equal(t, localStructField.Type(), libbeatStructField.Type())
assert.Equal(t,
localStructField.Type(),
libbeatStructField.Type(),
fmt.Sprintf("expected type %s for config field %q, got %s",
libbeatStructField.Type(), name, localStructField.Type(),
),
)
delete(libbeatStructFields, name)
}

knownUnhandled := []string{
"backoff",
"bulk_max_size",
"compression_level",
"escape_html",
"headers",
// TODO Kerberos auth (https:/elastic/apm-server/issues/3794)
"kerberos",
"loadbalance",
"max_retries",
"parameters",
}
for name := range libbeatStructFields {
assert.Contains(t, knownUnhandled, name)
}
}

0 comments on commit 25b8195

Please sign in to comment.