aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/vty_test_runner.py
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-09-11 10:46:56 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-09-11 20:20:33 +0200
commit733bec862627d6ecc934fd928eb5b3a2e22771b8 (patch)
treedf624fb2f348c2cde01078ed264379a67553e3f5 /openbsc/tests/vty_test_runner.py
parent56595f8647d6ee5de1c74077e83ca438102b5ff4 (diff)
vty: Hide unconfigured BTS on 'write'
This prevents the application from crashing when there is a half configured BTS (e.g. by using the command 'bts 1' when there isn't a BTS 1) and the 'write' command is used.
Diffstat (limited to 'openbsc/tests/vty_test_runner.py')
-rw-r--r--openbsc/tests/vty_test_runner.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 460b70e77..7f71288ff 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -88,6 +88,17 @@ class TestVTYGenericBSC(TestVTYBase):
self.assertTrue(self.vty.verify("trx 0",['']))
self.assertEquals(self.vty.node(), 'config-net-bts-trx')
self.checkForEndAndExit()
+ self.vty.command("write terminal")
+ self.assertTrue(self.vty.verify("exit",['']))
+ self.assertEquals(self.vty.node(), 'config-net-bts')
+ self.assertTrue(self.vty.verify("exit",['']))
+ self.assertTrue(self.vty.verify("bts 1",['']))
+ self.assertEquals(self.vty.node(), 'config-net-bts')
+ self.checkForEndAndExit()
+ self.assertTrue(self.vty.verify("trx 1",['']))
+ self.assertEquals(self.vty.node(), 'config-net-bts-trx')
+ self.checkForEndAndExit()
+ self.vty.command("write terminal")
self.assertTrue(self.vty.verify("exit",['']))
self.assertEquals(self.vty.node(), 'config-net-bts')
self.assertTrue(self.vty.verify("exit",['']))