mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
21 lines
532 B
Go
21 lines
532 B
Go
package logstorage
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestPipeLimitUpdateNeededFields(t *testing.T) {
|
|
f := func(s, neededFields, unneededFields, neededFieldsExpected, unneededFieldsExpected string) {
|
|
t.Helper()
|
|
expectPipeNeededFields(t, s, neededFields, unneededFields, neededFieldsExpected, unneededFieldsExpected)
|
|
}
|
|
|
|
// all the needed fields
|
|
f("limit 10", "*", "", "*", "")
|
|
|
|
// all the needed fields, plus unneeded fields
|
|
f("limit 10", "*", "f1,f2", "*", "f1,f2")
|
|
|
|
// needed fields
|
|
f("limit 10", "f1,f2", "", "f1,f2", "")
|
|
}
|