INNER CODE UNIT · Go

TestDecodeNoData

Edgio/vflow · ipfix/decoder_test.go:133

func TestDecodeNoData(t *testing.T) {
	ip := net.ParseIP("127.0.0.1")
	mCache := GetCache("cache.file")
	body := []byte{}
	d := NewDecoder(ip, body)
	if _, err := d.Decode(mCache); err == nil {
		t.Error("expected err but nothing")
	}
}

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)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…