Skip to content

Commit

Permalink
Update log builder settings unpack testing (#7467)
Browse files Browse the repository at this point in the history
  • Loading branch information
exekias authored and ruflin committed Jul 5, 2018
1 parent 0ece14d commit 47b35b7
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions filebeat/autodiscover/builder/hints/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func TestGenerateHints(t *testing.T) {
"containers": map[string]interface{}{
"ids": []interface{}{"abc"},
},
"close_timeout": "true",
},
},
{
Expand Down Expand Up @@ -99,6 +100,7 @@ func TestGenerateHints(t *testing.T) {
},
"include_lines": []interface{}{"^test", "^test1"},
"exclude_lines": []interface{}{"^test2", "^test3"},
"close_timeout": "true",
},
},
{
Expand Down Expand Up @@ -134,6 +136,7 @@ func TestGenerateHints(t *testing.T) {
"pattern": "^test",
"negate": "true",
},
"close_timeout": "true",
},
},
{
Expand Down Expand Up @@ -201,6 +204,7 @@ func TestGenerateHints(t *testing.T) {
"containers": map[string]interface{}{
"ids": []interface{}{"abc"},
},
"close_timeout": "true",
"processors": []interface{}{
map[string]interface{}{
"dissect": map[string]interface{}{
Expand Down Expand Up @@ -244,6 +248,7 @@ func TestGenerateHints(t *testing.T) {
"stream": "all",
"ids": []interface{}{"abc"},
},
"close_timeout": "true",
},
},
"access": map[string]interface{}{
Expand All @@ -254,6 +259,7 @@ func TestGenerateHints(t *testing.T) {
"stream": "all",
"ids": []interface{}{"abc"},
},
"close_timeout": "true",
},
},
},
Expand Down Expand Up @@ -290,6 +296,7 @@ func TestGenerateHints(t *testing.T) {
"stream": "all",
"ids": []interface{}{"abc"},
},
"close_timeout": "true",
},
},
"error": map[string]interface{}{
Expand All @@ -300,6 +307,7 @@ func TestGenerateHints(t *testing.T) {
"stream": "all",
"ids": []interface{}{"abc"},
},
"close_timeout": "true",
},
},
},
Expand Down Expand Up @@ -337,6 +345,7 @@ func TestGenerateHints(t *testing.T) {
"stream": "stdout",
"ids": []interface{}{"abc"},
},
"close_timeout": "true",
},
},
"error": map[string]interface{}{
Expand All @@ -347,6 +356,7 @@ func TestGenerateHints(t *testing.T) {
"stream": "stderr",
"ids": []interface{}{"abc"},
},
"close_timeout": "true",
},
},
},
Expand All @@ -355,11 +365,14 @@ func TestGenerateHints(t *testing.T) {

for _, test := range tests {
cfg, _ := common.NewConfigFrom(map[string]interface{}{
"type": "docker",
"containers": map[string]interface{}{
"ids": []string{
"${data.container.id}",
"config": map[string]interface{}{
"type": "docker",
"containers": map[string]interface{}{
"ids": []string{
"${data.container.id}",
},
},
"close_timeout": "true",
},
})

Expand Down

0 comments on commit 47b35b7

Please sign in to comment.