mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-24 03:06:48 +01:00
22 lines
536 B
Go
22 lines
536 B
Go
package logstorage
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestPipeOffsetUpdateNeededFields(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("offset 10", "*", "", "*", "")
|
|
|
|
// all the needed fields, plus unneeded fields
|
|
f("offset 10", "*", "f1,f2", "*", "f1,f2")
|
|
|
|
// needed fields
|
|
f("offset 10", "f1,f2", "", "f1,f2", "")
|
|
}
|