Skip to content

Commit

Permalink
Update config_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
blakerouse authored Sep 25, 2024
1 parent 55e5375 commit 6aeba30
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions x-pack/filebeat/fbreceiver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ func TestValidate(t *testing.T) {
hasError bool
errorString string
}{
"No Items": {
"Empty config": {
c: &Config{Beatconfig: map[string]interface{}{}},
hasError: true,
errorString: "NO config sent",
errorString: "Configuration is required",
},
"No filebeat section": {
c: &Config{Beatconfig: map[string]interface{}{"other": map[string]interface{}{}}},
hasError: true,
errorString: "Configuration key 'filebeat' is required",
},
"Valid config": {
c: &Config{Beatconfig: map[string]interface{}{"filebeat": map[string]interface{}{}}},
Expand Down

0 comments on commit 6aeba30

Please sign in to comment.