Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config is now rooted under "schema" key #5544

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kibana/send_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func SendConfig(ctx context.Context, client Client, conf *ucfg.Config) error {
}

func format(m map[string]interface{}) map[string]interface{} {
return map[string]interface{}{"schemaJson": m}
return map[string]interface{}{"schema": m}
}

func flattenAndClean(conf *ucfg.Config) (map[string]interface{}, error) {
Expand Down
4 changes: 2 additions & 2 deletions kibana/send_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func TestFlattenAndFormat(t *testing.T) {
assert.NoError(t, err)

flat = format(flat)
assert.Contains(t, flat, "schemaJson")
assert.Contains(t, flat, "schema")

flat = flat["schemaJson"].(map[string]interface{})
flat = flat["schema"].(map[string]interface{})
for k := range flat {
assert.NotContains(t, k, "elasticsearch")
assert.NotContains(t, k, "kibana")
Expand Down