Skip to content
Snippets Groups Projects
Commit 94c252b9 authored by Marco Pracucci's avatar Marco Pracucci Committed by Ed
Browse files

Parallelly run regex and json stages pipeline tests

parent d235e483
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,8 @@ var testJSONLogLine = `
`
func TestPipeline_JSON(t *testing.T) {
t.Parallel()
tests := map[string]struct {
config string
entry string
......@@ -74,7 +76,11 @@ func TestPipeline_JSON(t *testing.T) {
}
for testName, testData := range tests {
testData := testData
t.Run(testName, func(t *testing.T) {
t.Parallel()
pl, err := NewPipeline(util.Logger, loadConfig(testData.config), nil, prometheus.DefaultRegisterer)
if err != nil {
t.Fatal(err)
......
......@@ -31,6 +31,8 @@ pipeline_stages:
var testRegexLogLine = `11.11.11.11 - frank [25/Jan/2000:14:00:01 -0500] "GET /1986.js HTTP/1.1" 200 932 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6"`
func TestPipeline_Regex(t *testing.T) {
t.Parallel()
tests := map[string]struct {
config string
entry string
......@@ -74,7 +76,11 @@ func TestPipeline_Regex(t *testing.T) {
}
for testName, testData := range tests {
testData := testData
t.Run(testName, func(t *testing.T) {
t.Parallel()
pl, err := NewPipeline(util.Logger, loadConfig(testData.config), nil, prometheus.DefaultRegisterer)
if err != nil {
t.Fatal(err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment