diff --git a/entrypoint/parser/logstash/expression.go b/entrypoint/parser/logstash/expression.go index f929bc69..090d5ccf 100644 --- a/entrypoint/parser/logstash/expression.go +++ b/entrypoint/parser/logstash/expression.go @@ -61,7 +61,7 @@ func toWhenExpression(lsExpression string) (string, error) { case TERNARY: default: - return ktokens, fmt.Errorf("unknow token %s", tok.Type) + return ktokens, fmt.Errorf("unknow token %d", tok.Type) } ktokens = ktokens + separator + value separator = " " diff --git a/processors/filter-eval/eval_test.go b/processors/filter-eval/eval_test.go index c1cb53ac..e0289814 100644 --- a/processors/filter-eval/eval_test.go +++ b/processors/filter-eval/eval_test.go @@ -167,7 +167,7 @@ func TestTemplateErrorUrlNotFound(t *testing.T) { }, ) - assert.EqualError(t, err, "Get http://127.0.0.1/iuherfiuhoiuehroiuhzeroiuhaiuzheifuhaerg: dial tcp 127.0.0.1:80: getsockopt: connection refused") + assert.Regexp(t, "Get http://127.0.0.1/iuherfiuhoiuehroiuhzeroiuhaiuzheifuhaerg: dial tcp 127.0.0.1:80: .*: connection refused", err.Error()) } func TestTemplateErrorPathIsDirectory(t *testing.T) { diff --git a/processors/filter-grok/grok_processor.go b/processors/filter-grok/grok_processor.go index c02d2f26..46270b78 100644 --- a/processors/filter-grok/grok_processor.go +++ b/processors/filter-grok/grok_processor.go @@ -81,7 +81,7 @@ func (p *processor) fixGrokMatch(conf interface{}) (map[string][]string, error) case string: fixMatch[fieldName] = []string{v} default: - return fixMatch, fmt.Errorf("unsupported match value format %V", reflect.TypeOf(v)) + return fixMatch, fmt.Errorf("unsupported match value format %v", reflect.TypeOf(v)) } } default: