summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/global_policy_test.py
diff options
context:
space:
mode:
authorWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-12-08 03:53:34 -0500
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-12-10 06:51:21 -0800
commitfff2c32fb4ba2fb324953cb4cc96e515282524d9 (patch)
treeeec69f962c740bf272d6e8b81585785d5dbe9e03 /test/scenario_test/global_policy_test.py
parent296ffdba9aac672f95c91b6b290297a8298e4823 (diff)
server: fix bug when global import policy rejects a route
routes rejected by global import policy was not deleted from RIB Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/global_policy_test.py')
-rw-r--r--test/scenario_test/global_policy_test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/scenario_test/global_policy_test.py b/test/scenario_test/global_policy_test.py
index 0d1e1ba9..634bf233 100644
--- a/test/scenario_test/global_policy_test.py
+++ b/test/scenario_test/global_policy_test.py
@@ -263,6 +263,17 @@ class GoBGPTestBase(unittest.TestCase):
self.assertTrue(path['med'] == 100)
self.assertTrue(path['local-pref'] == 100)
+ def test_18_reject_policy(self):
+ self.gobgp.local('gobgp global policy import set default reject')
+ self.gobgp.local('gobgp neighbor all softresetin')
+
+ time.sleep(1)
+
+ # self-generated routes remain since softresetin doesn't re-evaluate
+ # them
+ for v in self.gobgp.get_global_rib():
+ for p in v['paths']:
+ self.assertTrue(p['nexthop'] == '0.0.0.0')
if __name__ == '__main__':