INNER CODE UNIT · Go
TestDecodeTemplate
Edgio/vflow · ipfix/decoder_test.go:143
func TestDecodeTemplate(t *testing.T) {
ip := net.ParseIP("127.0.0.1")
mCache := GetCache("cache.file")
d := NewDecoder(ip, tpl)
_, err := d.Decode(mCache)
if err != nil {
t.Error("unexpected error happened:", err)
}
}
func TestDecodeOptsTemplate(t *testing.T) {
ip := net.ParseIP("127.0.0.1")
mCache := GetCache("cache.file")
d := NewDecoder(ip, optsTpl)
_, err := d.Decode(mCache)
if err != nil {
t.Error("unexpected error happened:", err)
}