summaryrefslogtreecommitdiffhomepage
path: root/server/peer_test.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-07 22:40:07 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-07 22:40:07 +0900
commit608d09c90e906ed43e9206e903443753f73d80b0 (patch)
tree390e62cdf724284e88b8effc6df810774f24f47e /server/peer_test.go
parent10d54c1095be1b74633a1b7e8b5cee1c9f568a66 (diff)
rest: support show table with specified route family
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/peer_test.go')
-rw-r--r--server/peer_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/peer_test.go b/server/peer_test.go
index 7c78427c..a637a18d 100644
--- a/server/peer_test.go
+++ b/server/peer_test.go
@@ -123,7 +123,7 @@ func TestPeerAdminShutdownWhileEstablished(t *testing.T) {
peer.acceptedConnCh <- m
waitUntil(assert, bgp.BGP_FSM_ESTABLISHED, peer, 1000)
- restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0")
+ restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg := &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,
@@ -166,7 +166,7 @@ func TestPeerAdminShutdownWhileIdle(t *testing.T) {
waitUntil(assert, bgp.BGP_FSM_IDLE, peer, 1000)
- restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0")
+ restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg := &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,
@@ -201,7 +201,7 @@ func TestPeerAdminShutdownWhileActive(t *testing.T) {
waitUntil(assert, bgp.BGP_FSM_ACTIVE, peer, 1000)
- restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0")
+ restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg := &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,
@@ -238,7 +238,7 @@ func TestPeerAdminShutdownWhileOpensent(t *testing.T) {
peer.acceptedConnCh <- m
waitUntil(assert, bgp.BGP_FSM_OPENSENT, peer, 1000)
- restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0")
+ restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg := &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,
@@ -283,7 +283,7 @@ func TestPeerAdminShutdownWhileOpenconfirm(t *testing.T) {
peer.acceptedConnCh <- m
waitUntil(assert, bgp.BGP_FSM_OPENCONFIRM, peer, 1000)
- restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0")
+ restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg := &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,
@@ -334,7 +334,7 @@ func TestPeerAdminEnable(t *testing.T) {
waitUntil(assert, bgp.BGP_FSM_ESTABLISHED, peer, 1000)
// shutdown peer at first
- restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0")
+ restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg := &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,
@@ -350,7 +350,7 @@ func TestPeerAdminEnable(t *testing.T) {
assert.Equal(ADMIN_STATE_DOWN, peer.fsm.adminState)
// enable peer
- restReq = api.NewRestRequest(api.REQ_NEIGHBOR_ENABLE, "0.0.0.0")
+ restReq = api.NewRestRequest(api.REQ_NEIGHBOR_ENABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg = &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,
@@ -397,7 +397,7 @@ func TestPeerAdminShutdownReject(t *testing.T) {
peer.acceptedConnCh <- m
waitUntil(assert, bgp.BGP_FSM_OPENSENT, peer, 1000)
- restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0")
+ restReq := api.NewRestRequest(api.REQ_NEIGHBOR_DISABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg := &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,
@@ -411,7 +411,7 @@ func TestPeerAdminShutdownReject(t *testing.T) {
json.Unmarshal(result.Data, &res)
assert.Equal("previous request is still remaining", res["result"])
- restReq = api.NewRestRequest(api.REQ_NEIGHBOR_ENABLE, "0.0.0.0")
+ restReq = api.NewRestRequest(api.REQ_NEIGHBOR_ENABLE, "0.0.0.0", bgp.RF_IPv4_UC)
msg = &serverMsg{
msgType: SRV_MSG_API,
msgData: restReq,