Change in osmo-bsc[master]: remove traces of osmo-bsc_nat in python test (osmoappdesc/test_runner)

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/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jun 11 12:03:16 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9527 )

Change subject: remove traces of osmo-bsc_nat in python test (osmoappdesc/test_runner)
......................................................................

remove traces of osmo-bsc_nat in python test (osmoappdesc/test_runner)

Change-Id: I9127ddb7b29eb82defd3a8afac9c1dbfd424fb72
---
M osmoappdesc.py
M tests/ctrl_test_runner.py
2 files changed, 2 insertions(+), 82 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/osmoappdesc.py b/osmoappdesc.py
index 338239c..f5f18b2 100644
--- a/osmoappdesc.py
+++ b/osmoappdesc.py
@@ -16,12 +16,10 @@
 
 app_configs = {
     "osmo-bsc": ["doc/examples/osmo-bsc/osmo-bsc.cfg",
-                 "doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg"],
-    "nat": ["doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg"],
+                 "doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg"]
 }
 
-apps = [(4242, "src/osmo-bsc/osmo-bsc", "OsmoBSC", "osmo-bsc"),
-        (4244, "src/osmo-bsc_nat/osmo-bsc_nat",  "OsmoBSCNAT", "nat"),
+apps = [(4242, "src/osmo-bsc/osmo-bsc", "OsmoBSC", "osmo-bsc")
         ]
 
 vty_command = ["./src/osmo-bsc/osmo-bsc", "-c",
diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
index f43c09a..cc37c97 100755
--- a/tests/ctrl_test_runner.py
+++ b/tests/ctrl_test_runner.py
@@ -489,68 +489,6 @@
         self.assertEquals(r['var'], 'mcc')
         self.assertEquals(r['value'], '002')
 
-class TestCtrlNAT(TestCtrlBase):
-
-    def ctrl_command(self):
-        return ["./src/osmo-bsc_nat/osmo-bsc_nat", "-c",
-                "doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg"]
-
-    def ctrl_app(self):
-        return (4250, "./src/osmo-bsc_nat/osmo-bsc_nat", "OsmoNAT", "nat")
-
-    def testAccessList(self):
-        r = self.do_get('net.0.bsc_cfg.0.access-list-name')
-        self.assertEquals(r['mtype'], 'GET_REPLY')
-        self.assertEquals(r['var'], 'net')
-        self.assertEquals(r['value'], None)
-
-        r = self.do_set('net.0.bsc_cfg.0.access-list-name', 'bla')
-        self.assertEquals(r['mtype'], 'SET_REPLY')
-        self.assertEquals(r['var'], 'net')
-        self.assertEquals(r['value'], 'bla')
-
-        r = self.do_get('net.0.bsc_cfg.0.access-list-name')
-        self.assertEquals(r['mtype'], 'GET_REPLY')
-        self.assertEquals(r['var'], 'net')
-        self.assertEquals(r['value'], 'bla')
-
-        r = self.do_set('net.0.bsc_cfg.0.no-access-list-name', '1')
-        self.assertEquals(r['mtype'], 'SET_REPLY')
-        self.assertEquals(r['var'], 'net')
-        self.assertEquals(r['value'], None)
-
-        r = self.do_get('net.0.bsc_cfg.0.access-list-name')
-        self.assertEquals(r['mtype'], 'GET_REPLY')
-        self.assertEquals(r['var'], 'net')
-        self.assertEquals(r['value'], None)
-
-    def testAccessListManagement(self):
-        r = self.do_set("net.0.add.allow.access-list.404", "abc")
-        self.assertEquals(r['mtype'], 'ERROR')
-
-        r = self.do_set("net.0.add.allow.access-list.bla", "^234$")
-        self.assertEquals(r['mtype'], 'SET_REPLY')
-        self.assertEquals(r['var'], 'net.0.add.allow.access-list.bla')
-        self.assertEquals(r['value'], 'IMSI allow added to access list')
-
-        # TODO.. find a way to actually see if this rule has been
-        # added. e.g. by implementing a get for the list.
-
-class TestCtrlSGSN(TestCtrlBase):
-    def ctrl_command(self):
-        return ["./src/gprs/osmo-sgsn", "-c",
-                "doc/examples/osmo-sgsn/osmo-sgsn.cfg"]
-
-    def ctrl_app(self):
-        return (4251, "./src/gprs/osmo-sgsn", "OsmoSGSN", "sgsn")
-
-    def testListSubscribers(self):
-        # TODO. Add command to mark a subscriber as active
-        r = self.do_get('subscriber-list-active-v1')
-        self.assertEquals(r['mtype'], 'GET_REPLY')
-        self.assertEquals(r['var'], 'subscriber-list-active-v1')
-        self.assertEquals(r['value'], None)
-
 def add_bsc_test(suite, workdir):
     if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc/osmo-bsc")):
         print("Skipping the BSC test")
@@ -558,20 +496,6 @@
     test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlBSC)
     suite.addTest(test)
 
-def add_nat_test(suite, workdir):
-    if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc_nat/osmo-bsc_nat")):
-        print("Skipping the NAT test")
-        return
-    test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlNAT)
-    suite.addTest(test)
-
-def add_sgsn_test(suite, workdir):
-    if not os.path.isfile(os.path.join(workdir, "src/gprs/osmo-sgsn")):
-        print("Skipping the SGSN test")
-        return
-    test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlSGSN)
-    suite.addTest(test)
-
 if __name__ == '__main__':
     import argparse
     import sys
@@ -603,7 +527,5 @@
     print "Running tests for specific control commands"
     suite = unittest.TestSuite()
     add_bsc_test(suite, workdir)
-    add_nat_test(suite, workdir)
-    add_sgsn_test(suite, workdir)
     res = unittest.TextTestRunner(verbosity=verbose_level).run(suite)
     sys.exit(len(res.errors) + len(res.failures))

-- 
To view, visit https://gerrit.osmocom.org/9527
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9127ddb7b29eb82defd3a8afac9c1dbfd424fb72
Gerrit-Change-Number: 9527
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180611/1be21072/attachment.htm>


More information about the gerrit-log mailing list