summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp/bgp_test.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-04-11 09:32:39 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-04-20 13:14:09 +0900
commitba727eb444d17b73167d78a71d427c115ec4c34a (patch)
tree06badfd3bf99720be26eb110ae18964128a1f70a /packet/bgp/bgp_test.go
parent427f0fc5f7922dee4ef11bf3c629134769227654 (diff)
packet: fix encap nlri (add encap ipv6 nlri)
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp/bgp_test.go')
-rw-r--r--packet/bgp/bgp_test.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/packet/bgp/bgp_test.go b/packet/bgp/bgp_test.go
index 612e8c7b..af4e2938 100644
--- a/packet/bgp/bgp_test.go
+++ b/packet/bgp/bgp_test.go
@@ -18,7 +18,6 @@ package bgp
import (
"bytes"
"encoding/binary"
- "fmt"
"github.com/stretchr/testify/assert"
"net"
"reflect"
@@ -213,14 +212,14 @@ func Test_RFC5512(t *testing.T) {
assert.Equal(nil, err)
assert.Equal("10.0.0.1", n2.String())
- n1 = NewEncapNLRI("2001::1")
- buf1, err = n1.Serialize()
+ n3 := NewEncapv6NLRI("2001::1")
+ buf1, err = n3.Serialize()
assert.Equal(nil, err)
- n2 = NewEncapNLRI("")
- err = n2.DecodeFromBytes(buf1)
+ n4 := NewEncapv6NLRI("")
+ err = n4.DecodeFromBytes(buf1)
assert.Equal(nil, err)
- assert.Equal("2001::1", n2.String())
+ assert.Equal("2001::1", n4.String())
}
func Test_ASLen(t *testing.T) {
@@ -446,5 +445,4 @@ func Test_FlowSpecNlriL2(t *testing.T) {
t.Error(len(buf2), n2, buf2)
t.Log(bytes.Equal(buf1, buf2))
}
- fmt.Println(n1, n2)
}