diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-07-06 16:41:30 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-07-06 16:50:19 +0200 |
commit | 42cf2e03c936d34c1bda7d491f9e367bf02dddce (patch) | |
tree | f085716b4fc8a4b53f85f37d4011bbed58aa1276 /openbsc/tests/vty_test_runner.py | |
parent | dcbc83355e1d7243180d436cadabd913bee2c922 (diff) |
sms: Add a way to always route SMS through SMPP systems
default-route would only be looked at after there has been
no subscriber in the local database. Depending on the setup
this is not what one wants. This has been discussed at the
OsmoDevCon and there have been hacks in some branches. Let's
introduce a VTY command to select if SMPP should be consulted
first and then fallback to the current behavior.
Diffstat (limited to 'openbsc/tests/vty_test_runner.py')
-rw-r--r-- | openbsc/tests/vty_test_runner.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 4cd46653e..1aedcf21c 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -154,6 +154,28 @@ class TestVTYNITB(TestVTYGenericBSC): res = self.vty.command("list") return "smpp" in res + def testSmppFirst(self): + if not self.checkForSmpp(): + return + + # enable the configuration + self.vty.enable() + self.vty.command("configure terminal") + self.vty.command("smpp") + + # check the default + res = self.vty.command("write terminal") + self.assert_(res.find(' no smpp-first') > 0) + + self.vty.verify("smpp-first", ['']) + res = self.vty.command("write terminal") + self.assert_(res.find(' smpp-first') > 0) + self.assertEquals(res.find('no smpp-first'), -1) + + self.vty.verify("no smpp-first", ['']) + res = self.vty.command("write terminal") + self.assert_(res.find('no smpp-first') > 0) + def testVtyTree(self): self.vty.enable() self.assertTrue(self.vty.verify("configure terminal", [''])) |