Skip to content

Commit

Permalink
[Kafka output] Add test case for topic with %{} under Elastic-Agent
Browse files Browse the repository at this point in the history
This commit adds a test case making explicity that topics containing
the syntax `%{}` is not supported under Elastic-Agent
  • Loading branch information
belimawr committed Mar 14, 2024
1 parent 12f0442 commit e6280db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libbeat/outputs/kafka/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ func TestConfigUnderElasticAgent(t *testing.T) {
},
expectError: true,
},
{
name: "topic with invalid characters from dynamic topic selection",
cfg: mapstr.M{
"topic": "%{event.field}",
},
expectError: true,
},

// The default config does not set `topic` not `topics`.
{
name: "empty config is invalid",
Expand Down

0 comments on commit e6280db

Please sign in to comment.