diff options
Diffstat (limited to 'test/scenario_test/gobgp_test.py')
-rw-r--r-- | test/scenario_test/gobgp_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/scenario_test/gobgp_test.py b/test/scenario_test/gobgp_test.py index 03443777..45f36f1e 100644 --- a/test/scenario_test/gobgp_test.py +++ b/test/scenario_test/gobgp_test.py @@ -260,11 +260,12 @@ class GoBGPTestBase(unittest.TestCase): retry_count = 0 while True: rib = self.ask_gobgp(type, neighbor_address, af) - paths = [p for p in rib if p['nlri']['prefix'] == target_prefix] + paths = [p for p in rib if p['prefix'] == target_prefix] if len(paths) > 0: assert len(paths) == 1 - return paths[0] + assert len(paths[0]['paths']) == 1 + return paths[0]['paths'][0] else: retry_count += 1 if retry_count > retry: |