MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestMatchBytesCache

Function TestMatchBytesCache

internal/waf/utils/utils_test.go:24–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestMatchBytesCache(t *testing.T) {
25 regex := re.MustCompile(`\d+`)
26 t.Log(utils.MatchBytesCache(regex, []byte("123"), utils.CacheShortLife))
27 t.Log(utils.MatchBytesCache(regex, []byte("123"), utils.CacheShortLife))
28 t.Log(utils.MatchBytesCache(regex, []byte("123"), utils.CacheShortLife))
29}
30
31func TestMatchRemoteCache(t *testing.T) {
32 if !testutils.IsSingleTesting() {

Callers

nothing calls this directly

Calls 3

MustCompileFunction · 0.92
MatchBytesCacheFunction · 0.92
LogMethod · 0.80

Tested by

no test coverage detected