aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/vty_test_runner.py
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-09-11 10:46:55 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-09-11 20:18:42 +0200
commit56595f8647d6ee5de1c74077e83ca438102b5ff4 (patch)
tree54d596cb3e32242d1dad87e555bfe2a8020eea6b /openbsc/tests/vty_test_runner.py
parent3ffd9bc0a4efe03022d87513dbde3efc7b4fb8e6 (diff)
ussd: Send USSD on call setup on MSC errors
Send an USSD message to the mobile station requesting a connection for a call or a SMS when the link to the MSC is down or in the grace period. The messages can be set (and this feature activated) by setting bsc/missing-msc-text resp. msc/bsc-grace-text via the vty. The generation of both messages has been tested manually. Ticket: OW#957
Diffstat (limited to 'openbsc/tests/vty_test_runner.py')
-rw-r--r--openbsc/tests/vty_test_runner.py35
1 files changed, 33 insertions, 2 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index ab9670ce0..460b70e77 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -207,7 +207,7 @@ class TestVTYBSC(TestVTYGenericBSC):
self.vty.command("msc 0")
self.assertEquals(self.vty.node(), 'config-msc')
- def testUssdNotifications(self):
+ def testUssdNotificationsMsc(self):
self.vty.enable()
self.vty.command("configure terminal")
self.vty.command("msc")
@@ -215,10 +215,12 @@ class TestVTYBSC(TestVTYGenericBSC):
# Test invalid input
self.vty.verify("bsc-msc-lost-text", ['% Command incomplete.'])
self.vty.verify("bsc-welcome-text", ['% Command incomplete.'])
+ self.vty.verify("bsc-grace-text", ['% Command incomplete.'])
# Enable USSD notifications
self.vty.verify("bsc-msc-lost-text MSC disconnected", [''])
self.vty.verify("bsc-welcome-text Hello MS", [''])
+ self.vty.verify("bsc-grace-text In grace period", [''])
# Verify settings
res = self.vty.command("write terminal")
@@ -226,17 +228,46 @@ class TestVTYBSC(TestVTYGenericBSC):
self.assertEquals(res.find('no bsc-msc-lost-text'), -1)
self.assert_(res.find('bsc-welcome-text Hello MS') > 0)
self.assertEquals(res.find('no bsc-welcome-text'), -1)
+ self.assert_(res.find('bsc-grace-text In grace period') > 0)
+ self.assertEquals(res.find('no bsc-grace-text'), -1)
# Now disable it..
self.vty.verify("no bsc-msc-lost-text", [''])
self.vty.verify("no bsc-welcome-text", [''])
+ self.vty.verify("no bsc-grace-text", [''])
# Verify settings
res = self.vty.command("write terminal")
self.assertEquals(res.find('bsc-msc-lost-text MSC disconnected'), -1)
self.assert_(res.find('no bsc-msc-lost-text') > 0)
- self.assert_(res.find('no bsc-welcome-text') > 0)
self.assertEquals(res.find('bsc-welcome-text Hello MS'), -1)
+ self.assert_(res.find('no bsc-welcome-text') > 0)
+ self.assertEquals(res.find('bsc-grace-text In grace period'), -1)
+ self.assert_(res.find('no bsc-grace-text') > 0)
+
+ def testUssdNotificationsBsc(self):
+ self.vty.enable()
+ self.vty.command("configure terminal")
+ self.vty.command("bsc")
+
+ # Test invalid input
+ self.vty.verify("missing-msc-text", ['% Command incomplete.'])
+
+ # Enable USSD notifications
+ self.vty.verify("missing-msc-text No MSC found", [''])
+
+ # Verify settings
+ res = self.vty.command("write terminal")
+ self.assert_(res.find('missing-msc-text No MSC found') > 0)
+ self.assertEquals(res.find('no missing-msc-text'), -1)
+
+ # Now disable it..
+ self.vty.verify("no missing-msc-text", [''])
+
+ # Verify settings
+ res = self.vty.command("write terminal")
+ self.assertEquals(res.find('missing-msc-text No MSC found'), -1)
+ self.assert_(res.find('no missing-msc-text') > 0)
class TestVTYNAT(TestVTYGenericBSC):