summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test
diff options
context:
space:
mode:
Diffstat (limited to 'test/scenario_test')
-rw-r--r--test/scenario_test/bgp_router_test.py8
-rw-r--r--test/scenario_test/graceful_restart_test.py2
-rw-r--r--test/scenario_test/monitor_test.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py
index f6831f79..3154df21 100644
--- a/test/scenario_test/bgp_router_test.py
+++ b/test/scenario_test/bgp_router_test.py
@@ -333,10 +333,10 @@ class GoBGPTestBase(unittest.TestCase):
paths = g1.get_adj_rib_out(q1, '30.0.0.0/24')
self.assertTrue(len(paths) == 1)
- self.assertTrue(paths[0]['source-id'] == '<nil>')
+ self.assertTrue('source-id' not in paths[0])
paths = g1.get_adj_rib_out(q2, '30.0.0.0/24')
self.assertTrue(len(paths) == 1)
- self.assertTrue(paths[0]['source-id'] == '<nil>')
+ self.assertTrue('source-id' not in paths[0])
g1.local('gobgp global rib del 30.0.0.0/24')
@@ -405,8 +405,8 @@ class GoBGPTestBase(unittest.TestCase):
cnt2 = 0
g = next_prefix()
n = g.next()
- for path in g1.get_global_rib():
- if path['prefix'] == n:
+ for path in g1.local("gobgp global rib", capture=True).split('\n')[1:]:
+ if [elem for elem in path.split(' ') if elem != ''][1] == n:
try:
cnt2 += 1
n = g.next()
diff --git a/test/scenario_test/graceful_restart_test.py b/test/scenario_test/graceful_restart_test.py
index 9b97b82b..6f0f4211 100644
--- a/test/scenario_test/graceful_restart_test.py
+++ b/test/scenario_test/graceful_restart_test.py
@@ -82,7 +82,7 @@ class GoBGPTestBase(unittest.TestCase):
self.assertTrue(len(g2.get_global_rib('10.10.10.0/24')) == 0)
for d in g2.get_global_rib():
for p in d['paths']:
- self.assertFalse(p['stale'])
+ self.assertFalse(p.get('stale', False))
def test_04_add_non_graceful_restart_enabled_peer(self):
g1 = self.bgpds['g1']
diff --git a/test/scenario_test/monitor_test.py b/test/scenario_test/monitor_test.py
index 147391d1..4c5df7c1 100644
--- a/test/scenario_test/monitor_test.py
+++ b/test/scenario_test/monitor_test.py
@@ -87,7 +87,7 @@ class GoBGPTestBase(unittest.TestCase):
while True:
info = qu.get(timeout=120)
print 'monitor got {0}'.format(info)
- self.assertTrue(info['isWithdraw'])
+ self.assertTrue(info['withdrawal'])
break