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 and leehinman committed Sep 25, 2024
1 parent f354cb4 commit 71f6deb
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 71f6deb

Please sign in to comment.