aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/vty_test_runner.py
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-07-06 16:41:30 +0200
committerIvan Kluchnikov <kluchnikovi@gmail.com>2015-08-20 19:19:18 +0300
commit85a304a4fe71e2b74e1881cc517c23950252796a (patch)
tree89366aee1b404533525e53cacd1eb43d490f263d /openbsc/tests/vty_test_runner.py
parent8a62c5021884ac1dec7f7a338bf591657080a2d5 (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.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 3581b67c9..928eb8680 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", ['']))