[PATCH 2/2] vty: Enable the end/exit test for libosmocore nodes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Tue Oct 29 08:30:31 UTC 2013


This patch replaces the calls to ignoredCheckForEndAndExit by calls
to checkForEndAndExit to test the libosmocore nodes, too. The former
method is removed.

Sponsored-by: On-Waves ehf
---
 openbsc/tests/vty_test_runner.py |   19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 18cf688..45b0c06 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -67,18 +67,11 @@ class TestVTYGenericBSC(TestVTYBase):
         self.assert_(res.find('  end\r') > 0)
         #print 'found "end"\n'
 
-    def ignoredCheckForEndAndExit(self):
-        sys.stderr.write('Going to ignore the next assertion(s) due to known bugs\n')
-        try:
-            self.checkForEndAndExit()
-        except BaseException as e:
-            sys.stderr.write('Expected and ignored failure: %s\n' % (str(e)))
-
     def _testConfigNetworkTree(self):
         self.vty.enable()
         self.assertTrue(self.vty.verify("configure terminal",['']))
         self.assertEquals(self.vty.node(), 'config')
-        self.ignoredCheckForEndAndExit()
+        self.checkForEndAndExit()
         self.assertTrue(self.vty.verify("network",['']))
         self.assertEquals(self.vty.node(), 'config-net')
         self.checkForEndAndExit()
@@ -129,7 +122,7 @@ class TestVTYNITB(TestVTYGenericBSC):
         self.vty.enable()
         self.assertTrue(self.vty.verify("configure terminal", ['']))
         self.assertEquals(self.vty.node(), 'config')
-        self.ignoredCheckForEndAndExit()
+        self.checkForEndAndExit()
         self.assertTrue(self.vty.verify('mncc-int', ['']))
         self.assertEquals(self.vty.node(), 'config-mncc-int')
         self.checkForEndAndExit()
@@ -139,7 +132,7 @@ class TestVTYNITB(TestVTYGenericBSC):
             self.assertEquals(self.vty.node(), 'config')
             self.assertTrue(self.vty.verify('smpp', ['']))
             self.assertEquals(self.vty.node(), 'config-smpp')
-            self.ignoredCheckForEndAndExit()
+            self.checkForEndAndExit()
             self.assertTrue(self.vty.verify("exit", ['']))
 
         self.assertEquals(self.vty.node(), 'config')
@@ -247,7 +240,7 @@ class TestVTYBSC(TestVTYGenericBSC):
         self.vty.enable()
         self.assertTrue(self.vty.verify("configure terminal", ['']))
         self.assertEquals(self.vty.node(), 'config')
-        self.ignoredCheckForEndAndExit()
+        self.checkForEndAndExit()
         self.assertTrue(self.vty.verify("msc 0", ['']))
         self.assertEquals(self.vty.node(), 'config-msc')
         self.checkForEndAndExit()
@@ -378,7 +371,7 @@ class TestVTYNAT(TestVTYGenericBSC):
         self.vty.enable()
         self.assertTrue(self.vty.verify('configure terminal', ['']))
         self.assertEquals(self.vty.node(), 'config')
-        self.ignoredCheckForEndAndExit()
+        self.checkForEndAndExit()
         self.assertTrue(self.vty.verify('mgcp', ['']))
         self.assertEquals(self.vty.node(), 'config-mgcp')
         self.checkForEndAndExit()
@@ -508,7 +501,7 @@ class TestVTYGbproxy(TestVTYGenericBSC):
         self.vty.enable()
         self.assertTrue(self.vty.verify('configure terminal', ['']))
         self.assertEquals(self.vty.node(), 'config')
-        self.ignoredCheckForEndAndExit()
+        self.checkForEndAndExit()
         self.assertTrue(self.vty.verify('ns', ['']))
         self.assertEquals(self.vty.node(), 'config-ns')
         self.checkForEndAndExit()
-- 
1.7.9.5





More information about the OpenBSC mailing list