MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TestSeqFilterCompile

Function TestSeqFilterCompile

pkg/filter/filter_test.go:82–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

80}
81
82func TestSeqFilterCompile(t *testing.T) {
83 f := New(`sequence
84|evt.name = 'CreateProcess'| by ps.exe
85|evt.name = 'CreateFile' and file.operation = 'create'| by file.name
86`, cfg)
87 require.NoError(t, f.Compile())
88 require.NotNil(t, f.GetSequence())
89 assert.Len(t, f.GetSequence().Expressions, 2)
90 assert.NotNil(t, f.GetSequence().Expressions[0].By)
91 assert.True(t, len(f.GetStringFields()) > 0)
92}
93
94func TestSeqFilterInvalidBoundRefs(t *testing.T) {
95 f := New(`sequence

Callers

nothing calls this directly

Calls 5

NewFunction · 0.70
CompileMethod · 0.65
GetSequenceMethod · 0.65
GetStringFieldsMethod · 0.65
LenMethod · 0.45

Tested by

no test coverage detected