From 7f100c9712de5c684462e809bf31a58c0c326337 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 23 Apr 2015 20:25:17 -0400 Subject: nat: Make mode-set patching optional --- openbsc/tests/vty_test_runner.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'openbsc/tests/vty_test_runner.py') diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index fb4ca7d1a..3581b67c9 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -588,6 +588,23 @@ class TestVTYNAT(TestVTYGenericBSC): res = self.vty.command("number-rewrite rewrite.cfg") res = self.vty.command("no number-rewrite") + def testEnsureNoEnsureModeSet(self): + self.vty.enable() + res = self.vty.command("configure terminal") + res = self.vty.command("nat") + + # Ensure the default + res = self.vty.command("show running-config") + self.assert_(res.find('\n sdp-ensure-amr-mode-set') > 0) + + self.vty.command("sdp-ensure-amr-mode-set") + res = self.vty.command("show running-config") + self.assert_(res.find('\n sdp-ensure-amr-mode-set') > 0) + + self.vty.command("no sdp-ensure-amr-mode-set") + res = self.vty.command("show running-config") + self.assert_(res.find('\n no sdp-ensure-amr-mode-set') > 0) + def testRewritePostNoRewrite(self): self.vty.enable() self.vty.command("configure terminal") -- cgit v1.2.3